Posts

Showing posts from April, 2022

Arrow function, Normal function and function expression

  //! This is normal type function declaration function add ( a , b ) {   return a + b ; } console . log ( add ( 5 , 6 )); //! This is function expression const add1 = function ( a , b ) {   return a + b ; } console . log ( add1 ( 5 , 6 )); //! This is arrow function //* Yaha pe one line code isliye return or curly braces use nhi honge const add2 = ( a , b ) => a + b ; console . log ( add2 ( 5 , 6 ));