Last active
May 17, 2024 02:09
-
-
Save microbial/265626c79e6a64a34d8f to your computer and use it in GitHub Desktop.
es6-style-js
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
//NON ES6 way | |
function actionWord () { | |
//Put your action here | |
} | |
//for example | |
//CREATE the function | |
function drive () { | |
console.log('I am driving now') | |
} | |
//Execute the function | |
drive() |
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
//ES6 way | |
actionWord () => { | |
//Put your action here | |
} | |
//for example | |
//CREATE the function | |
drive () => { | |
console.log('I am driving now') | |
} | |
//Execute the function | |
drive() | |
//Creating a fucntion needs => {} |
Yeah I showed you the more common way on the screen share. Just stick with that way for now. I added another file here to show how that works.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{} around the parameter only?