Advertisement
vladovip

Smallest of Three numbers

Feb 7th, 2021
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(num1, num2, num3) {
  2.  
  3.     if (num1 < num2 && num1 < num3) {
  4.         console.log(num1);
  5.     } else if (num2 < num3) {
  6.         console.log(num2)
  7.     } else {
  8.         console.log(num3);
  9.     }
  10.  
  11.  
  12. }
  13. solve(2, 5, 3);
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement