Possible Duplicate:
Possible to assign to multiple variables from an array?
If in python i can do this
x = "Hi there and hello there"
v1, v2, v3, v4, v5 = x.split(" ")
but im not sure how to do it in javascript..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can turn it into an array by using javascript
.splitFor example
Then all your variables will be in the array like below
You can show this using console.log or an alert like so.
References
http://www.tizag.com/javascriptT/javascript-string-split.php