Tutorial link of this
In this tutorial, I have made a working fan using javascript.
On clicking the power button the fan blades will rotate in clockwise direction until you do not off the button.
And there is also a fast mode button which rotate fan-blades with increasing speed.
Topics covered in this tutorial :--
- addEventListener()
- Toggle between class.
- How to make animation.