<< Back

Exercise 2.1 - Lights and Buttons

a) Make the LED blink

This is the console. All output created with writeLog() is shown here.

Press the button to make the LED blink in red.

Enter a number in milliseconds for the blinking frequency. To update the frequency, click the button again.


script.js

This is the JavaScript code behind the above application.