Then I copy pasted your solution into my editor and commented it out, and I looked into how I could change my code to make it work.
I tried for about 30 minutes before giving in that I couldn’t figure it out. I found your list looking for ways to really learn and practice JavaScript as a self-taught dev.
Need to see the video solution for this project? Get John Smilga's JavaScript Tutorial and Projects Course Now!įiled Under: Beginner JavaScript Projects Tagged With: arrays, eventListeners About jsbeginners I didn't learn any new JavaScript features during this project but I was refreshed on using JavaScript to style CSS (e.g. Once the button was clicked, a different background color would appear. Since I was given the HTML and CSS assets (really, just the styled BootStrap4 button), all I had to do was create an array of different colors and then add a ‘click' event listener to the button. This background color changing app was short and sweet to complete.