Advertisement
chloecodes

ForEach JS

Oct 15th, 2019
597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var myListItems = document.querySelectorAll(‘li’)
  2.  
  3. myListItems.forEach(item => {
  4.     item.classList.add(‘yellowBackground’)
  5. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement