Assessment 1: Loop to increment a variable




Rate this product

Assessment 1: Write a loop to increment a variable by 1 (20%)

Students will have to write a loop in JavaScript on an html page that will output the
incremented value of a variable by 1 each iteration, up until a pre-determined value limit.


Using an HTML file, use the <script block at the top of the page to write a loop that will
increment the numeric value of a pre-defined variable by one every iteration, and then stop
at a specific point, ending the loop.

Please refer to the rubric at the end of this document for evaluation details.

• Loop can be any of the loops covered in class
• Name the variable(s) something meaningful
• Exit the loop on pre-determined value limit (such as 50)

• Upload to D2L Dropbox folder labeled “Assessment 1: Write a Loop”