Create a method that takes two integers as arguments and return their sum
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
Comments
Leave a comment