Cyber Monday 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
6 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
5 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Buffy
5 months ago
A) str.substr(1, 5);
upvoted 0 times
...
Pamella
6 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Sommer
6 months ago
A) str.substr(1, 5);
upvoted 0 times
...
Sarina
6 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Shawnda
6 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Eliz
7 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
7 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
6 months ago
Yes, D) str.substring (0, 5) will also result in 'Sales'.
upvoted 0 times
...
Nobuko
7 months ago
I agree, B) str.substr (0, 5) will give us 'Sales'.
upvoted 0 times
...
...

Save Cancel