Javascript
"use strict";
at the top of files will prompt new compliers to throw more errors like for using undefined variables
Objects and arrays passed by reference
There are packages that work just in the browser, just in react, just for gatsby, or just for node
Control
Equality
===
is strict equality with type and strict
==
uses type coercion
Type Conversion
Find type with typeof(var)
Random Integer
Math.random gives number between 0(inclusive) and 1(exclusive).
Why Javascript Sucks
Can use a variable before it is initalized with no error
Additionally, some array methods cannot find NaN
, while others can.
Last updated