1// MULTIPLY FUNCTION
2const multiply = (num1, num2) => {
3 return num1 * num2;
4};
5let resulMultiply = multiply(4, 5);
6console.log(resulMultiply);
7// 20
1const multiply = (x,y)=>{
2if(x==1){ return y;}
3else if(x>1){
4return y +multiply(x-1,y)
5}
6else throw "Not Numbers"
7}
8var result = multiply(4,3);
9console.log(result)