What are the errors in the lines | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answer
+ 2
let not Let
9th Aug 2020, 8:57 PM
Gordon
Gordon - avatar