Consider following code snippet:

var s = 'myteststring';
console.log(s.split(',', 6));
What will be printed to the console?
Explanation
The split() method is used to split a string into an array of substrings, and returns the new array.

string.split(separator, limit);
Both parameters are optional. Separator specifies the character to use to split the string. Limit specifies the number of splits.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести