This project contains examples of unusual JavaScript behaviors, located in the js-weirdness
directory.
- type-coercion.js: Demonstrates type coercion in JavaScript.
- global-variables.js: Shows how global variables can be unintentionally created.
- this-keyword.js: Explains the behavior of the
this
keyword. - equality-comparison.js: Highlights the quirks of equality comparison.
- function-hoisting.js: Illustrates function hoisting.
- variable-hoisting.js: Discusses variable hoisting.
- closures.js: Explains closures and their behavior in loops.
- nan.js: Discusses the peculiarities of
NaN
. - object-prototype.js: Shows how modifying
Object.prototype
affects all objects. - asynchronous-behavior.js: Demonstrates JavaScript's asynchronous behavior.