slice text in js code example
Example 1: js slice
const arr=[1,2,3,4,5];
const slicedArr = arr.slice(1,4); // slicedArr = [2,3,4]
Example 2: js slice string at word
var str= "12344A56789";
var splitted = str.split('4A'); //this will output ["1234", "56789"]
var first = splitted[0]; //"1234"
var second = splitted[1]; //"56789"
console.log('First is: ' + first + ', and second is: ' + second);