Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Substring in Javascript using slice

let str = "Learning to code";

// slice between index 0 and index 5
console.log(str.slice(0, 5));
// slice between index 5 and index 10
console.log(str.slice(5, 10));
Source by www.tutorialstonight.com #
 
PREVIOUS NEXT
Tagged: #Substring #Javascript #slice
ADD COMMENT
Topic
Name
9+2 =