Advertisement
Didart

Numbers N To 1

Apr 2nd, 2022
1,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function numbersNto1(input) {
  2.     let digit = Number(input[0]);
  3.  
  4.     for (let index = digit; index >= 1; index--) {
  5.         console.log(index);
  6.     }
  7. }
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement