Created
October 12, 2020 15:40
-
-
Save jamesona/18f17affe795a35899e306f091da222d to your computer and use it in GitHub Desktop.
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 one() {console.log('one')} // named function | |
one(); | |
new Array([0]).forEach(function() {console.log('two')}) // anonymous function | |
const three = function() {console.log('three')}; // aliased anonymous function | |
three(); | |
const container = { | |
four: function() {console.log('four')}, // aliased anonymous function | |
five: () => console.log('five'), // aliased arrow function | |
six() { console.log('six') }, // named function | |
}; | |
container.four(); | |
container.five(); | |
container.six(); | |
const seven = () => console.log('seven'); // aliased arrow function | |
seven(); | |
(function() { | |
console.log('eight'); | |
})(); // immediately invoked function expression | |
(() => console.log('nine'))(); // immediately invoked arrow function expression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment