Skip to content

cs-fullstack-master/javascript-loops-timers-ic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

JavaScript Loops and Timer Events - ic

Exercise 1: Loop

Use a for loop to print numbers -3 through 8.

Exercise 2: Loop

Use a for loop to count from -5 to 5 three times in a row.

Exercise 3: Loop

Use a for loop to print only even numbers from -50 to 50.

Exercise 4: Loop

Use a for loop to print from 0 to 50. Once it gets to 10, print "TEN!!!" instead of the number.

Exercise 5: Loop

Prompt the user to enter a number. Prompt the user to enter another number. Create a for loop that counts from the first number to the second number.

Exercise 6: Loop

Create a hardcoded/fixed password. Create a loop that will ask the user to enter a password until it matches the hardcoded password. Once they match alert the user THAT’S CORRECT!!! Keep asking the user until they get the right password.

NOTE: Your code should handle the password regardless of the case (upper or lower).

Exercise 6: Repeating timer

Create a button with the text Start Countdown!. When the User clicks the button, display a countdown sequence in the browser as an <h2> from 10 to LIFTOFF!!. Display each number during the countdown each second (1000 ms), leading up to the word LIFTOFF!!!. Be sure to stop the timer once liftoff achieved.

About

JavaScript Loops and timer events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published