Project 8 · Coding

Web: JavaScript Click Counter

Make a button that counts how many times it's clicked.

Easy 30 min 2 components
Web: JavaScript Click Counter wiring diagram

What you'll learn

  • Select an element with document.querySelector.
  • Attach a click listener with addEventListener.
  • Update the DOM with textContent.

What's in the kit

  • Laptop or Chromebook
  • Internet connection (for first setup)

Protocol: software