javascript - There is a problem when printing the newly composed array. There are objects in it, but the length is empty.
给我你的怀抱
给我你的怀抱 2017-07-05 10:49:48
0
1
1135

Array A (this.slots[0].values) is newly created in the A method,
For example:
this.slots[0].values.push(newValue)
Print after creation There is no problem in coming out:

Then use it in other methods, method B,
When printed, the array becomes:

Compared:

What is the problem? No operations were performed during this period

给我你的怀抱
给我你的怀抱

reply all(1)
Peter_Zhu

It may be a problem with this pointer, var self = this, and then try using self to do this

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!