0

What are the errors in the lines

const mode = document.querySelector('.mode'); let dark = false; mode.addEventListener('click',() => { if(dark){ dark =false; document.documentElement. setAttribute('data-theme','dark'); mode.textcontent ='dark'; } else{ dark = true; document.documentElement. setAttribute('data-theme','light'); mode.textcontent = 'light'; } })

9th Aug 2020, 8:54 PM
BLACK
BLACK - avatar
1 Odpowiedź
+ 2
let not Let
9th Aug 2020, 8:57 PM
Gordon
Gordon - avatar