I don\'t understand this behaviour:
var string = \'a,b,c,d,e:10.\';
var array = string.split (\'.\');
I expect this:
consol
According to MDN web docs:
Note: When the string is empty, split() returns an array containing one empty string, rather than an empty array. If the string and separator are both empty strings, an empty array is returned.
const myString = '';
const splits = myString.split();
console.log(splits);
// ↪ [""]