JavaScript String substr() Method extract a part of the string, starting at the character at the specified position and returns the specified number of characters.
Example:
var string = "quizful";
var newString = string.substr(0,4);
console.log(newString); // will print "quiz" to console.
Login in to like
Login in to comment