Last active
February 19, 2019 02:05
-
-
Save dunckr/7092266 to your computer and use it in GitHub Desktop.
JS Cheatsheet
WIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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