Back
You can use the slice() method for multiple characters and also if you want a portion of string:
let string = 'Hello World'console.log(string.slice(2, 6));
let string = 'Hello World'
console.log(string.slice(2, 6));
I hope this will help.
Want to become a Java Expert? Join Java Course now!!
31k questions
32.8k answers
501 comments
693 users