Created
January 6, 2014 13:26
-
-
Save unknownuser88/8282877 to your computer and use it in GitHub Desktop.
substring(from, [to]) Returns the characters in a string between “from” and “to” indexes, NOT including “to” inself. “To” is optional, and if omitted, up to the end of the string is assumed.
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
//substring(from, [to]) | |
var myString = 'javascript rox'; | |
myString = myString.substring(0,10); | |
console.log(myString) | |
//output: javascript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment