Is there a 'none of the above' option? I feel like I'm just guessing here. Oh well, at least I get to practice my comedy skills with this exam question.
D) str.substring(0, 5) also looks good to me. Both substring() and substr() methods can be used to extract a substring, but I prefer substring() as it's more widely used.
I agree with Wilbert, because substr starts at the specified index and extracts a specified number of characters, while substring extracts characters between two specified indices.
Princess
9 days agoLaila
12 days agoLore
24 days agoJennifer
3 days agoIraida
15 days agoChery
29 days agoVeda
1 months agoIlda
1 months agoChan
1 months agoDomitila
21 days agoAlita
24 days agoParis
24 days agoMica
25 days agoWilbert
1 months ago