That’s a great point — it comes down to personal preference

There’s nothing wrong with using the plus sign + for string concatenation, though it can make HTML hard to read.

Hey Mohan C, thanks so much for reading!

const hello = "Hello "
const world = "World!"
console.log(hello + world) // Hello World!
const name = "Mohan"
console.log("Say hello to" + " " + name + " " + "for me!")
const someHTML = "<html>\n  <head>\n    <title>A page</title>\n  </head>\n  <body>\n    <p>Wow this is getting hard to read</p>\n  </body>\n</html>"

🤓 The physical therapist who writes JavaScript 💪 Web Developer 😎 Mentor 🧠 DPT 😄 SEO Expert 😁 React 😆 Jamstack 💬 Ask me anything 👉 👈

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