Last active
April 14, 2020 07:21
-
-
Save sahilpaudel/7d7d5910991179288d33cd5654870e43 to your computer and use it in GitHub Desktop.
How to create functions in 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
// Old way to create a function | |
function doSomething() { | |
console.log("Inside the old function"); | |
} | |
// New ES6 way to create a function | |
const doSomething = () => { | |
console.log("Inside the new function"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment