+ 1
How do I go back to dark mode when I click again?
How can I make the dark mode go back to the light mode when I click it again. I am a beginner at JavaScript so I don't know that much. Help. I've attached the code. https://code.sololearn.com/Wy1mvypdRJ22/?ref=app
5 Réponses
+ 3
https://code.sololearn.com/WA2532gv81f1
+ 2
You can use classlist toggle method to toggle classes of tags
+ 1
Oussama Merroun thank you very much brother, I didn't know it was that easy. 😅
+ 1
My pleasure! 😊
- 3
when on the code playground you can switch from light to dark, vice-versa in the top right-hand corner next to the make public or private switch