JS - basic types and ways of writing function
//* basic types of function *// //1) without parameters and without return type function Tuljapur(){ console.log("hello") } Tuljapur() //2) with parameters and without return type function Solapur(x,y){ console.log(x+y) } Solapur(100,200) //3) with parameters and with return type function Dharashiv(x,y){ return x * y } let aa1 = Dharashiv(5,4) console.log(aa1) console.log(aa1*6) //* different ways of writing function *// //1) function declaration function addA(x,y){ return x + y } let a1 = addA(20,30) console.log(a1) //2) function expression let addB = function(x,y){ return x + y } let a2 = addB(50, 40) console.log(a2) //3) arrow function let addC = (x,y)=>{ return x + y } let a3 = addC(60,40) console.log(a3)