Created
January 6, 2014 13:25
-
-
Save unknownuser88/8282862 to your computer and use it in GitHub Desktop.
slice(start, [end]) Returns a substring of the string based on the “start” and “end” index arguments, NOT including the “end” index itself. “End” is optional, and if none is specified, the slice includes all characters from “start” to end of string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//slice(start, end) | |
var text="excellent" | |
text.slice(0,4) //returns "exce" | |
text.slice(2,4) //returns "ce" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment