Algorithm for javascript pre-defined functions (parseInt, parseFloat, isNaN, etc.)

后端 未结 3 998
心在旅途
心在旅途 2021-01-11 23:56

What is the best way, if even possible, to see the underlying code for the predefined functions in Javascript. Is there documentation that shows how these were coded, or an

3条回答
  •  孤城傲影
    2021-01-12 00:31

    Those functions are implementation specific depending on browser, and are not written in JS (unless somebody's decided to write a browser engine in JS). The code is not guaranteed to be the same across environments, though they do have to (in theory) adhere to the ECMAScript specification for their behavior.

提交回复
热议问题