30 Days Of JavaScript

Day 17: Events

Wrap up

Congrats on completing today's lessons on events. It's a massive topic and we've barely scratched the surface BUT you have a good idea of how to use events to manipulate your DOM and data.

As a challenge for today - Add an event handler to the ball that when you press enter, makes the ball grow by 10px in diameter and when you click it, it shrinks by 10px.

Make sure the ball is never larger than 200px and never smaller than 10px.

You'll need to work out what the e.key is for the enter key and then also change your border radius, as well to make it circular the whole time.

Time for a quiz

It good to test your knowledge just after learning something new, it solidifies the connections in your mind and identifies any areas that you should go back over.

The Pro version of 30 Days of JavaScript comes with a 10 question multiple choice quiz at the end of each day, if you want to take these quizzes (and get a host of other Pro features) then consider:

Joining Pro today

Outline

Go Pro?

If you upgraded to pro, sign in here

  • About
  • Blog
  • Privacy
Looking to email me? You can get me on my first name at allthecode.co