current position:Home>For some problems in changing the three methods that this points to in JavaScript, bind, apply, and call

For some problems in changing the three methods that this points to in JavaScript, bind, apply, and call

2022-06-24 10:03:46CSDN Q & A

img

img

As shown in the figure code
Add... Before passing in a function ~ And declare a variable return Will return a -1, Declare a variable and return It will return a -1- Parameters
Add... Before passing in a function ! And declare a variable return Will return a false, If you put return Comments will return a true
Similarly, if the front becomes + perhaps - Will return to NaN
This is what I found while learning and trying , I hope I can help solve

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/175/202206171559428677.html

Random recommended