Javascript. Assign array values to multiple variables? [duplicate]
问题 This question already has answers here : Multiple assignment in javascript? What does [a,b,c] = [1, 2, 3]; mean? (4 answers) Closed 4 years ago . var a,b,c; var arr = [1,2,3]; [a,b,c] = arr; this code works perfectly in Firefox resulting a=1, b=2 and c=3, but it doesn't work in Chrome. Is it a Chrome bug or it is not valid javascript code? (I failed to find it in javascript references) How can I modify this code to make it suitable for Chrome, with minimum damage to it? (I don't really like