BlackFriday 2024! 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 Javascript Developer I exam
Question #: 80
Topic #: 5
[All 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
5 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
4 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Buffy
4 months ago
A) str.substr(1, 5);
upvoted 0 times
...
Pamella
5 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Sommer
5 months ago
A) str.substr(1, 5);
upvoted 0 times
...
Sarina
5 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Shawnda
5 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Eliz
6 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
6 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
5 months ago
Yes, D) str.substring (0, 5) will also result in 'Sales'.
upvoted 0 times
...
Nobuko
6 months ago
I agree, B) str.substr (0, 5) will give us 'Sales'.
upvoted 0 times
...
...

Save Cancel