In my first ever JavaScript code, I made a tic-tac-toe with Nick Creel using HTML, CSS, and JS. I want to mention that after I interacted more with JS, I realized that this days, people use JS to modify entire page with JS in order to give a seamless interaction with users.
Check out the game Tic-Tac-Toe and below is the source code I want to show. This concept is not new. However, since people use this techniques even more, someone built a library to make it easier.
Here is an example where everything is controlled by JS: