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

How to host application on server new way

 copy the htacess from public to root copy the server.php from public to root but rename to index.php htacess <IfModule mod_rewrite.c>...