javascript - es6 problem of converting class array into array
扔个三星炸死你
扔个三星炸死你 2017-06-30 09:55:43
0
3
611

Chestnut:
var a = {'1':'gg','2':'love','4':'meimei',length:5};
var arr=[.. .a];
console.log(arr);

Error reported under Google Chrome: Uncaught TypeError: a[Symbol.iterator] is not a function

Definition of array-like:/a/11...

javascript introduction documentation on ‘...’: https://developer.mozilla.org...

The official JavaScript documentation says that '...' can convert a class array into an array. Why does it still report an error? confuse!

扔个三星炸死你
扔个三星炸死你

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!