+ 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

5th Nov 2021, 6:41 PM
Roohan Khan
Roohan Khan - avatar
5 Antworten
+ 3
https://code.sololearn.com/WA2532gv81f1
5th Nov 2021, 6:54 PM
Oussama Merroun
Oussama Merroun - avatar
+ 2
You can use classlist toggle method to toggle classes of tags
6th Nov 2021, 10:37 AM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
+ 1
Oussama Merroun thank you very much brother, I didn't know it was that easy. 😅
5th Nov 2021, 11:10 PM
Roohan Khan
Roohan Khan - avatar
+ 1
My pleasure! 😊
6th Nov 2021, 12:00 AM
Oussama Merroun
Oussama Merroun - avatar
- 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
5th Nov 2021, 6:57 PM
Bianka Morris
Bianka Morris - avatar