Last active
June 27, 2020 02:14
-
-
Save chapmanjacobd/48ddafc4247304dd646bc5f618b114d8 to your computer and use it in GitHub Desktop.
js cheatsheet
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
// function | |
(() => 0)() | |
((room, board) => room + board)(800, 150) | |
// function/block | |
(() => {})() | |
((room, board) => {return room + board})(800, 150) | |
// return object literal | |
x => ({ y: x }) | |
x => { | |
return { y: x } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://leanpub.com/javascriptallongesix/read#closures