DailyJS
Published in

DailyJS

5 Ways to Convert a Value to String in JavaScript

CodeTidbit by SamanthaMing.com

If you’re following the Airbnb’s Style Guide, the preferred way is using “String()” 👍

It’s also the one I use because it’s the most explicit — making it easy for other people to follow the intention of your code 🤓

Remember the best code is not necessarily the most clever way, it’s the one that best communicates the understanding of your code to others…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Samantha Ming

Samantha Ming

7K Followers

Frontend Developer sharing weekly JS, HTML, CSS code tidbits🔥 Discover them all on samanthaming.com 💛