What does “ [native code] ” mean?

前端 未结 2 1344
旧时难觅i
旧时难觅i 2020-12-04 15:03

I tried to investigate the jQuery code, so I used this:

document.write($.constructor);

jsfiddle

I got this result:



        
2条回答
  •  -上瘾入骨i
    2020-12-04 16:04

    $, jQuery is just a function. Without invoking it, it's just an ordinary function. A function's constructor is Function, hence $.constructor shows [native code].

提交回复
热议问题