ProdanTenev

Numbers 1...N with Step 3

Feb 25th, 2022
1,069
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.13 KB | None | 0 0
  1. function numsWithStep(input) {
  2.     let num = Number(input[0]);
  3.     for (let i = 1; i <= num; i += 3) {
  4.        console.log(i);
  5.     }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment