Answer to Question #223999 in HTML/JavaScript Web Application for Shee

Question #223999

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


1
Expert's answer
2021-08-09T02:30:33-0400
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS