Advertisement
Didart

Numbers 1 to N with Step 3

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