THIS IS AN ARROW FUNCTIONS
const myfunction = () => console.log("function called");
OR
const myfunction = () => {
console.log("function called");
return "anything";
}
THIS FUNCTION CALLS ITSELF
(function myfuntion(){
console.log("function called");
})()
NESTED FUNCTIONS
function outter(){
function inner1(){
//code
}
}
I'm actually a javascript newbie (started a month ago)
So if there's a mistake please tell me.
Top comments (1)
Thanks.
The other is the Function expression.
However, I often use an arrow function instead of the above.