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 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
17 days 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
23 days 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
Elsa
7 days ago
B) is also a valid choice, it starts from the beginning of the string.
upvoted 0 times
...
...
Felice
24 days 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
28 days 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
Fabiola
4 days ago
I prefer using substr() method for string manipulation.
upvoted 0 times
...
Lelia
8 days ago
D) str.substring (0, 5);
upvoted 0 times
...
Lemuel
11 days ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Whitley
1 months ago
B) and D) both return 'Sales', but D) is the cleaner and more straightforward solution.
upvoted 0 times
Haydee
14 days ago
D) str.substring (0, 5);
upvoted 0 times
...
Roselle
17 days ago
C) str.substring (1, 5);
upvoted 0 times
...
Kina
22 days ago
B) str.substr (0, 5);
upvoted 0 times
...
Shawnda
25 days ago
A) str.substr(1, 5);
upvoted 0 times
...
...
Serina
2 months ago
I agree with Sueann, because substr starts at the specified index and extracts the specified number of characters.
upvoted 0 times
...
Sueann
2 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