Skip to content

Instantly share code, notes, and snippets.

@seanreed1111
Last active January 3, 2016 22:29
Show Gist options
  • Save seanreed1111/8529190 to your computer and use it in GitHub Desktop.
Save seanreed1111/8529190 to your computer and use it in GitHub Desktop.
intro javascript

typeof(3) 'number'

typeof(3) === typeof(4.32) true

5/0 Infinity

3/" bob" NaN

NaN === NaN false

typeof(NaN) 'number'

isNaN(NaN) true

Math.pow(2,3) 8

var firstName = "cindy"; undefined

var y; undefined

y === "cool" false

"some" + "person" 'someperson'

var first = "Bart"; undefined

var last = "Simpson"; undefined

first + " " + last 'Bart Simpson'

first + ' ' + last 'Bart Simpson'

"cool".length 4

"phat" === "phat" true

typeof("cats") 'string'

3 + "bob" '3bob'

round(4.87)

Math.round(4.87) 5

6 / "2" 3

3 * "bob" NaN

var x, y; undefined

var sport; undefined

var hobby = "programming" undefined

var sport; undefined

var sport; undefined sport === undefined true

typeof("brogrammer") 'string'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment