4 ways to writing javascript function

default function declaration

 function sum(a,b){return a+b;}

function expression


const sum =  function sum(a,b){return a+b;}

arrrow function

const sum = (a,b) => {return a+b;}

consiec arrow function

const sum = (a,b) =>a+b;




No comments:

Post a Comment

create cartoon video using ai

  https://www.piclumen.com/ using this we can crate cartoon photos https://hailuoai.video/ its not free upto 1000 points we canuse it for fr...