lodash.findIndex第三个参数作用?
发布于 9 年前 作者 DevinXian 4609 次浏览 最后一次编辑是 8 年前 来自 问答

lodash.findIndex(array, callback, thisArg); findIndex 没有弄清楚thisArg这个参数是做什么的,还望解答~非常感谢啦!

2 回复

直观感觉是 callback 在调用的时候函数体用到 this 那么, this 就指向 thisArg.

@jiyinyiyong the this binding callback,确实感觉是那么回事儿~多谢回复,我应该用代码验证下

回到顶部