Skip to content

Instantly share code, notes, and snippets.

@chapmanjacobd
Last active June 27, 2020 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chapmanjacobd/48ddafc4247304dd646bc5f618b114d8 to your computer and use it in GitHub Desktop.
Save chapmanjacobd/48ddafc4247304dd646bc5f618b114d8 to your computer and use it in GitHub Desktop.
js cheatsheet
// 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 }
}
@chapmanjacobd
Copy link
Author

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