Basic JavaScript Exercises

Basic JavaScript Exercises

Current Counter: 0


1pt: Simple Functions

When the 'increase' button is clicked, increment the counter above.
When the 'decrease' button is clicked, decrement the counter above.


1pt: Simple For Loop

When this button is clicked, display every number from 0 up to and including the counter above.

Result:


1pt: Repetition with Condition

When this button is clicked, display all odd numbers from 1 to the counter above.

Result:


1pt: Arrays

Add every multiple of 5 up to the counter to an array in reverse order, then print the array itself to the console.


2pts: Objects and Form Fields






2pts: Objects and Form Fields pt. 2


2pt: Changing Styles

When either button is clicked, only this paragraph changes color.