You are given a number N. Create a program that loops through all of the numbers from 1 to N and prints them. N will always be positive.
Input
Output
5
1
2
3
4
Here's the answer:
function printNumbers(args) { let input = args[0]; for (var i = 1; i <= input; i++) { console.log(i); } }
622 questions
979 answers
129 comments
53 users