Skip to content

Instantly share code, notes, and snippets.

@unknownuser88
Created January 6, 2014 13:26
Show Gist options
  • Save unknownuser88/8282877 to your computer and use it in GitHub Desktop.
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.
//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