Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Javascript-Developer-I Topic 1 Question 78 Discussion

Actual exam question for Salesforce's Salesforce Certified JavaScript Developer I exam
Question #: 78
Topic #: 1
[All Salesforce Certified JavaScript Developer I Questions]

Refer to the string below:

const str = 'Salesforce';

Which two statements result in the word 'Sales'?

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: B, D

Contribute your Thoughts:

Salley
2 months ago
Option C is kinda sus, don't you think? Substring always trips me up, but I'm going with D to play it safe.
upvoted 0 times
Paulina
2 months ago
I agree with you, I'm going with D as well just to be safe.
upvoted 0 times
...
Filiberto
2 months ago
I think C is correct, it starts at index 1 and goes up to index 5.
upvoted 0 times
...
...
Junita
3 months ago
This is a piece of cake! D is the obvious choice. I bet the exam writer is a Salesforce employee moonlighting as a question creator.
upvoted 0 times
Izetta
2 months ago
D) str.substring (0, 5);
upvoted 0 times
...
Cristy
2 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Kathrine
3 months ago
Hmm, I was thinking A would do the trick, but I guess the 'Salesf' is not what we want. Silly me!
upvoted 0 times
Hildred
2 months ago
Yan: Oh, I see. Thanks for clarifying!
upvoted 0 times
...
Yan
2 months ago
User 2: Yes, that's correct. It will give us 'Sales'.
upvoted 0 times
...
Sheridan
2 months ago
User 1: I think B) str.substr(0, 5) is one of the answers.
upvoted 0 times
...
Nikita
3 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Elroy
3 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Oretha
3 months ago
That makes sense to me now. Let's go with B and D.
upvoted 0 times
...
Rebbecca
3 months ago
So, the answers are B and D?
upvoted 0 times
...
Jerlene
3 months ago
B and D both work, but I prefer D because it's more intuitive and readable.
upvoted 0 times
Mitzie
2 months ago
D) str.substring (0, 5);
upvoted 0 times
...
Buddy
3 months ago
I think B is easier to remember.
upvoted 0 times
...
Sherill
3 months ago
I agree, D is definitely more intuitive.
upvoted 0 times
...
Lizbeth
3 months ago
I think B is also a good option, it gives the correct result.
upvoted 0 times
...
Tomas
3 months ago
I agree, D is definitely more intuitive.
upvoted 0 times
...
Gretchen
3 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
An
3 months ago
For substr, I believe B is right since substr(0, 5) also gives 'Sales'.
upvoted 0 times
...
Marcelle
4 months ago
Option D is the way to go! It's the only one that gives us the 'Sales' substring.
upvoted 0 times
Rory
3 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Ressie
3 months ago
D) str.substring (0, 5);
upvoted 0 times
...
Jettie
3 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Rory
3 months ago
D) str.substring (0, 5);
upvoted 0 times
...
...
Lavina
4 months ago
I think D is correct because substring(0, 5) gets 'Sales'.
upvoted 0 times
...
Leana
4 months ago
Yeah, I'm confused with substr and substring.
upvoted 0 times
...
Oretha
4 months ago
This question is tricky.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77