November 3, 2022
How to Detect Dark Mode in JavaScript?
Every website, web app, and mobile app offers a dark mode. The dark mode is helpful while doing late-night coding or worse, trading into altcoins. We can detect dark mode using the prefers-color-scheme media query. But what if we have to use JavaScript? Let us find out. Detecting dark mode in JavaScript To detect dark