Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 27, 2021 08:19 am GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To