Liliana797979

integer and float - fundamentals

Apr 24th, 2021
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function integerAndFloat(num1, num2, num3) {
  2.     let sum = num1 + num2 + num3;
  3.     if (sum % 1 === 0) {
  4.         console.log(`${sum} - Integer`);
  5.  
  6.     } else {
  7.       console.log(`${sum} - Float`);
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment