codesignal split by 2s code example
Example 1: javascript explode
//split into array of strings.
var str = "Well, how, are , we , doing, today";
var res = str.split(",");
Example 2: split a message js
const message = 'This is a test'
var args = message.split(' ');
console.log(args[0]) // Responds "This"
console.log(args[1]) // Responds "is"
console.log(args[2]) // Responds "a"
console.log(args[3]) // Responds "test"