Show Menu
Cheatography

Javascript for first-time coders Cheat Sheet (DRAFT) by

Javascript for first-time coders: basic syntax, jargon definitions, examples.

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

Expression ______­___­_______ value of expression

1 + 1
2
"­hel­lo" + "­wor­ld" + 4
"­hel­low­orl­d4"
0 == true
false
(input­)=> {return input + 1; }
(input­)=> {return input + 1; }
((inpu­t)=> {return input + 1; })(4)
5
[1, 2, 3][10]
undefined
["Ro­n", null, "­Har­ry"][1]
null
[1, 2, 3].sli­ce(1)
[2, 3]
An expression is any piece of code that evaluates to a value.
 

basic types

String
"here is some text!"
text
Array
[ 0, 1, 2 ]
list
Object
{ name: "­Fre­d", age: 22 }
dictio­nary, map, instance
Number
99.9
float, integer
Function
(input) => { return "­out­put­"; }
method, lambda, callback
class
class Person { }
type