Quick references for fundamental things in JavaScript.
👉 Reading: You Don't Know JS Yet 1 - Get Started
//
for 1 line comment, /* */
for multi-line comment.;
.nameOfVariable
.
const FAV_PET = 'Cat';
.UpperCamelCase
should be used by convention for ES6 class names.\\\\
for special characters, for example, \\\\"
for a "
inside a ""
.''
can be used inside a ""
and vice versa.Open the browser (I use Chrome), press F12
to open the Inspect window, then choose tab Console. Now, you can practice on this console window, for example, try with 1+1
and press Ent
.
let
and const
.// Concise Object Literal Declarations
const getMousePosition = (x, y) => ({ x, y });