A look at what JavaScript's setTimeout() function does, and how it's used, and how we can use it to animate the traffic light page that we created in the first video of the playlist.
Binary flags: https://www.advanced-ict.info/interac...
Bitwise logic: https://www.advanced-ict.info/interac...
I've also written a blog on using arrays instead of if for "selection":
https://advancedictinfo.blogspot.com/...
Finally, here's an example traffic light that uses a slightly different approach to selecting the colours for the lights:
https://www.advanced-ict.info/javascr...
On this page of the site you can watch the video online Using setTimeout() in JavaScript / Traffic Light Example with a duration of hours minute second in good quality, which was uploaded by the user Computing and ICT in a Nutshell 01 February 2021, share the link with friends and acquaintances, this video has already been watched 2,873 times on youtube and it was liked by 14 viewers. Enjoy your viewing!