Purpose

Create a "flashlight" using DOM methods.

Instructions

  1. Fork and clone this repo to get started.
  2. Read the Usage Notes "The event listener callback" and the Examples section of this.
  3. Read the Syntax, Methods, and Examples section of this.
  4. You only need to write Javascript.
  5. Using DOM manipulation and the provided HTML and CSS, toggle the classlist for the "flashlight" element between .on and .off

Stretch:

  • Burn it down and build it from scratch with your own HTML and CSS
  • How could you use logic to create your own toggle?
  • Teach a classmate!

Javascript Terms To Know

DOM Manipulation

Event Listener

Callback Function

Toggle

Learning To Learn

Resources at your disposal:

  • Take notes on your process and prepare questions.
  • Use Polya's method. What is your plan?
  • Ask a classmate to talk through their process with you.