split(), splice(), join() javascript methods usage:
The split() method splits a String object into an array of strings by separating the string into substrings.
The splice() method changes the content of an array by removing existing elements and/or adding new elements.
The join() method joins all elements of an array into a string.
Sample:
var a = "asdasd|dasd|rttewrtert";var b = a.split('|');
// ["asdasd", "dasd", "rttewrtert"]var c = b.splice(1);
// ["dasd", "rttewrtert"]var d = c.join('');
// dasdrttewrtert
Result; “dasdrttewrtert”
Hope it helps!
Originally published at https://www.weboideas.com on January 16, 2017.