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 CRT-600 Topic 6 Question 86 Discussion

Actual exam question for Salesforce's CRT-600 exam
Question #: 86
Topic #: 6
[All CRT-600 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:

Youlanda
6 months ago
Haha, this question is a piece of cake! D) is the way to go, no doubt. Substr? More like sub-par in this scenario.
upvoted 0 times
...
Nathan
6 months ago
D) is the obvious choice here. Who wants to deal with those pesky index numbers when you can just use the start and end positions directly?
upvoted 0 times
Selma
4 months ago
C) is not correct, it includes the first character in the substring.
upvoted 0 times
...
Hubert
5 months ago
I agree, D) is the best option for getting 'Sales' from the string.
upvoted 0 times
...
Ashlyn
5 months ago
A) is incorrect, it starts from the second character of the string.
upvoted 0 times
...
Elsa
5 months ago
B) is also a valid choice, it starts from the beginning of the string.
upvoted 0 times
...
...
Felice
6 months ago
Hmm, I was going to say A) and C), but I can see how D) is the better option. Substring just makes more sense for this use case.
upvoted 0 times
...
Gaynell
6 months ago
I agree, D) is the way to go. It's more intuitive and easier to remember than the index-based substr() method.
upvoted 0 times
Merissa
5 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Fabiola
5 months ago
I prefer using substr() method for string manipulation.
upvoted 0 times
...
Lelia
5 months ago
D) str.substring (0, 5);
upvoted 0 times
...
Lemuel
5 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Whitley
6 months ago
B) and D) both return 'Sales', but D) is the cleaner and more straightforward solution.
upvoted 0 times
Haydee
5 months ago
D) str.substring (0, 5);
upvoted 0 times
...
Roselle
6 months ago
C) str.substring (1, 5);
upvoted 0 times
...
Kina
6 months ago
B) str.substr (0, 5);
upvoted 0 times
...
Shawnda
6 months ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Serina
7 months ago
I agree with Sueann, because substr starts at the specified index and extracts the specified number of characters.
upvoted 0 times
...
Sueann
7 months ago
I think the answer is A and B.
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