Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
String.prototype.slice() Method in String Class of Javascript Syntax with Examples
2391 Views
Usage 
string slice method works as substring. slice method takes two parameters one is starting index and end index of the characters to slice the string to a new string.
Syntax
[string] string.slice(starting_index,ending_index);
Example
var data = "knowledgewalls";
document.write(data.slice(2,4));
Output 
ow
Try it 
Best Lessons of "Javascript Syntax with Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details