Answers for "Substring in Javascript using slice"

0

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));
Posted by: Guest on December-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language