Advertisement
Kamend1

Untitled

Mar 6th, 2025
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve (...params) {
  2.     let smallestNum = Infinity;
  3.  
  4.     for (let num of params) {
  5.         if (num < smallestNum) {
  6.             smallestNum = num;
  7.         }
  8.     }
  9.  
  10.     return smallestNum;
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement