Having a dark mode on your website is a great thing that many web developers use. It's also really easy to make with one CSS class and a javascript...
For further actions, you may consider blocking this person and/or reporting abuse
its not working in ...
im so fustrated right now😢`
button.addEventListener(click,`function () {
return document.body.classList.toggle(".darktheme");
});
`
`
@emmancodex I don't think you need the
returnkeyword in your function since it only returns values like a string, number, or variable. Also you don't need the period on your class name because you just need the name and not the CSS selector. So it should be like this: