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
1 months agoLaila
1 months agoScarlet
8 days agoAlishia
9 days agoJohna
10 days agoMelodie
13 days agoGarry
1 months agoLore
2 months agoAleisha
22 days agoTommy
27 days agoJennifer
1 months agoIraida
2 months agoChery
2 months agoVeda
2 months agoIlda
2 months agoChan
2 months agoDomitila
2 months agoAlita
2 months agoParis
2 months agoMica
2 months agoWilbert
2 months ago