Answer the question
In order to leave comments, you need to log in
how to split string in js?
There is a line in which a space separates the data. How to process a string so that the first part of the string before the space is assigned to one variable, and the second part to the second variable.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
var strings = "это строка".split(' ');
var var1 = strings[0],
var2 = strings[1];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question