r/learnjavascript • • Oct 26 '20

Javascript string 🔥

193 Upvotes

31 comments sorted by

View all comments

2

u/Kesar13 Oct 26 '20

with the mention that you need backticks when you need a variable inside the string

i.e.: let variable = "string"

"this is a ${variable}" will log as"this is a ${variable}"

whilst

'this is a ${variable}' (read it as backtiks cant find it on mobile) will log as "this is a string"