Is it possible remove delimiters when you array.toString? (javascript)
var myArray = [ 'zero', 'one', 'two', 'three', 'four', 'five' ];
var result = myArray .toString();
result shoud be “zeroonetwothreefourfive”
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 could use
joininstead oftoString–joinwill join all the elements of the array into a string using the argument passed to thejoinfunction as a delimiter. So callingjoinand passing in an empty string should do exactly what you require.Demo – http://jsfiddle.net/jAEVY/