|
|
|
|
|
by kking50
2310 days ago
|
|
Read the ECMA scripts. ESPECIALLY sections 13 and 15. Seriously, even the best textbooks will only give you a superficial understanding relative to the actual standards. Sure there are different JS engines, but they all do roughly the same thing. Master the algorithms in the ECMA standard and you won't even need to read textbooks. You will be able to deduce and derive those concepts yourself. Understand exactly how JavaScript gets converted under the hood. Remember, ECMA could be implemented in any language not just C/C++. What you're looking for is algorithmic understanding. For example, here's the snippet that explains how "new" works in JavaScript https://www.ecma-international.org/ecma-262/5.1/#sec-15.2.2..... Going through the algorithm, your first thought may be "wtf is [[Prototype]]"? Dig into it. Understand when, where, and how [[proto]] and __proto__ get assigned. Learn about the cyclic references that allow everything to be an object including functions. Of course, feel free to use external resources to assist you while reading ECMA since it is quite dry. For the example above, this amazing Stack Overflow post can help you visualize the algorithm: https://stackoverflow.com/questions/650764/how-does-proto-di... |
|