Values
-Backtick-quoted (template literals) ables: ` fourteen is also ${10+4}` // fourteen is also 14 -Empty strings convert to false when parse to boolean: "" = false -let ,const & var scope with funtions -var doesnt scope with loops -let & const scope with loops |
Program Structure
switch (x) { case 1: break; case "cloudy": console.log("Bring umbrella."); break; default: break; } Function
-Default value of parameters is undefined. -Default value of parameters can be change: function power(base, exponent = 2) { ... } |
Variables Control
-A single bind allows multiple values: let x = 0, y = 'dog'; -Bind names can't begin with numbers: let 4number = 4; WRONG! - Bind names may contain: letters, numbers, ($), (_) Create Variables
let object = { happy : true, age : 20 } Number Object
|
Cheatography
https://cheatography.com
Javascript Cheat Sheet (DRAFT) by AlvaroRockster
This is a draft cheat sheet. It is a work in progress and is not finished yet.