Show Menu
Cheatography

Javascript syntax Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Variables

Use var to declare variables
 var someName = "some code"; 
 

Loops

The for loop:
for (var i = 0; i < 10; i++){

    // code here

}


The While loop:
var someThing = true;

while (someT­hing){

   // code here

}