DEV Community

Discussion on: Simple Dark-Light theme with VanillaJs

Collapse
 
sshymko profile image
Sergii Shymko • Edited

The ternary expression can be simplified to the following:

toggle.innerText = isLight ? "🌞" : "🌚"
Enter fullscreen mode Exit fullscreen mode