---
title: "Discussion on \"Template Literals in JavaScript: Write Cleaner Strings Without the Mess\" | Hashnode"
description: "Discussion on \"Template Literals in JavaScript: Write Cleaner Strings Without the Mess\". Why were template literals introduced?\nLet’s start with a small problem.\nEarlier in JavaScript, if you wanted to create a string with variables, you had to do this:\nconst name = \"Adarsh\";\nconst age ="
url: "https://hashnode.com/posts/template-literals-in-javascript-write-cleaner-strings-without-the-mess/69de60c991716f3cfb4f1e85"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Template Literals in JavaScript: Write Cleaner Strings Without the Mess](https://templateliteralsinjavascriptwritecleanerstringswithoutthemess.hashnode.dev/template-literals-in-javascript-write-cleaner-strings-without-the-mess?utm_source=hashnode&utm_medium=feed)

Why were template literals introduced? Let’s start with a small problem. Earlier in JavaScript, if you wanted to create a string with variables, you had to do this: const name = "Adarsh"; const age =

Apr 14 · 4 min read · templateliteralsinjavascriptwritecleanerstringswithoutthemess.hashnode.dev  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#javascript-template-literals](https://hashnode.com/tag/javascript-template-literals)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Adarsh Pandey](https://hashnode.com/@Adarshbytes)

@Adarshbytes

  
[View profile](https://hashnode.com/@Adarshbytes)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
