Skip to content

Instantly share code, notes, and snippets.

@dunckr
Last active February 19, 2019 02:05
Show Gist options
  • Save dunckr/7092266 to your computer and use it in GitHub Desktop.
Save dunckr/7092266 to your computer and use it in GitHub Desktop.
JS Cheatsheet WIP
## Array
# Mutators
pop
push
reverse
shift
sort
splice
unshift
# Accessors
concat
join
slice
indexOf
## String
charAt
concat
contains
indexOf
match
replace
slice
split
substr
trim
Array(30).join(' ') // empty string
!!variable // to boolean
Array.prototype.slice.call(arguments) // array like object into an array
str += 'Using' // number casting
Function.call.apply(Foo.prototype.method, arguments); // Foo.prototype.method.call(this, arg1, arg2... argN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment