Created
July 29, 2021 09:57
-
-
Save justcoder1/9f88f1d8a609dd7ed10b49abcd8e0e5a to your computer and use it in GitHub Desktop.
JavaScript - Functions
This file contains hidden or 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
// Original Functions | |
(hello = function() { | |
return "Hello World!" | |
}()) // By putting the () at the end this invokes the function | |
// Arrow Function | |
hello = () => { | |
return "Hello World!" | |
} | |
// if there is just one statement you can shorten to this | |
hello = () => "Hello World!"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment