December 2013
Intermediate to advanced
384 pages
9h 54m
English
var s1 = "The play's the thing"; var s2 = s1.splice(4,8); // s2 = "play"
You can carve a string into substrings using .splice(start, end) by specifying the starting index and the ending index. The section of the string starting with the character at the index specified by start and ending with the character just before end index is returned. All indexes are zero based.
Read now
Unlock full access