Open TonyGoodDay2 opened 7 years ago
Write a JavaScript for loop that will iterate from 0 to x. For each iteration, it will check if the current number is odd or even, and display a message to the screen. Sample Output : "0 is even" "1 is odd" "2 is even"
X should be set by the user in the HTML page
Write a JavaScript for loop that will iterate from 0 to x. For each iteration, it will check if the current number is odd or even, and display a message to the screen. Sample Output : "0 is even" "1 is odd" "2 is even"
X should be set by the user in the HTML page