An Interest In:
Web News this Week
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
September 27, 2021 08:19 am GMT
Original Link: https://dev.to/kiddcreator/javascript-developers-should-know-these-ways-of-defining-functions-1dp7
Javascript Developers should know these ways of defining functions
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.
Original Link: https://dev.to/kiddcreator/javascript-developers-should-know-these-ways-of-defining-functions-1dp7
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To