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 5 Question 80 Discussion

Actual exam question for Salesforce's Salesforce Certified JavaScript Developer I exam
Question #: 80
Topic #: 5
[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:

Denny
3 months ago
Hmm, I was thinking C) str.substring (1, 5) would work, but I guess that would give us 'alesf'. Rookie mistake!
upvoted 0 times
Gladys
2 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Buffy
2 months ago
A) str.substr(1, 5);
upvoted 0 times
...
Pamella
2 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Sommer
2 months ago
A) str.substr(1, 5);
upvoted 0 times
...
Sarina
2 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Shawnda
3 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Eliz
3 months ago
D) str.substring (0, 5) is the way to go. It's more readable and does the same thing as B).
upvoted 0 times
...
Marge
3 months ago
I think B) str.substr (0, 5) is the correct answer. That will give us 'Sales' from the string 'Salesforce'.
upvoted 0 times
Chantell
3 months ago
Yes, D) str.substring (0, 5) will also result in 'Sales'.
upvoted 0 times
...
Nobuko
3 months ago
I agree, B) str.substr (0, 5) will give us 'Sales'.
upvoted 0 times
...
...

Save Cancel