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
Зарегистрируйся сейчас
или Подпишись на будущие тесты