Wednesday, January 3, 2018

Lab 23 Refection

In this lab i had to make a check box that let you check of the list many way this lab was easy to do because i followed the video and the it show me that i needed and then i added this  checkboxes.forEach(checkbox => {
      console.log(checkbox);
      if (checkbox === this || checkbox === lastChecked) {
        inBetween = !inBetween;
        console.log('STarting to check them inbetween!');
      }

      if (inBetween) {
        checkbox.checked = true;
      }
    });
  }

  lastChecked = this;
}

checkboxes.forEach(checkbox => checkbox.addEventListener('click', handleCheck));
to my javascript to make to it work and it basically make sure you can you other check commands so you have different ways to use it. I don't see myself using this because it not useful.

No comments:

Post a Comment