Please tell me a question related to closures in javascript
为情所困
为情所困 2017-05-19 10:45:32
0
1
390

I have a question. In this js code, I change the value of dimensions. In the first function, I can see the change in the value of dimensions. However, in the second function, the value remains unchanged and is still the same as before. Okay, how to solve this problem?

Thanks!

为情所困
为情所困

reply all(1)
过去多啦不再A梦

Dear, I think this is caused by () => this of the arrow function. You can try replacing the arrow function with function

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template