Question #223999

Create a method that takes two integers as arguments and return their sum


Expert's answer

function sum(param1, param2){
      if (Number.isInteger(param1) && Number.isInteger(param2)){
            console.log(param1+param2);
      }else{
            console.log("One or both of your arguments is not an integer");
      }
}
sum(17,15);

//Result: 32
LATEST TUTORIALS
APPROVED BY CLIENTS