© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Ajay
JavaScript enthusiast and React developer building beautiful, responsive UIs.
Short and simple. I implemented the same functionality with if-else conditions and it was verbose, but you just made it very simple - one line. Thanks for the sharing it Jennifer Bland
Jennifer Bland
Senior Software Engineer. Google Developers Expert. Entrepreneur. Mountain Climber. Cat Lover. Gardener. World traveler.
Ajay,
I bet my old code is the same as yours. The more I programmed, I learned how to shorten it.