In this case, nothing, but when you want to write a complicated one for example html markup, then it's better to use ${ }
Actually not so… without ${ } the substitution of name and age will not happen. You will get exactly what you typed back
try them both and see for yourself. Better way of learning
so how people did it before es6?
what do you mean?
by the previous method
did u see both snippets he sent?
I know.. he said it doesn't work
but it works
It wouldn't work with single quotes and double quotes because ${} would be treated as a string and not as a placeholder. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
sir did you read the previous code
this one
inside ${} u can insert expression.
Обсуждают сегодня