1.

Explain recursion in JavaScript?

Answer»

Template STRINGS are also KNOWN as Template Literals. They are the new WAY to write Strings in JavaScript and been introduced in ES6. We can now write Stings using back-ticks(``), which have a special way to interpolate variables.

They are very useful in Expression interpolation and Multi-LINE strings. Although they don’t add any new feature to JavaScript, but they are a better visual way to write strings.

Expression interpolation
The old JavaScript way is quite CUMBERSOME and we have to use many + operators to concatenate Strings, whereas with back-ticks we interpolate variable name using ${}.

Multi-line strings
The old way to have multiline strings is to have a newline(\n) inserted after where we want the next line.
Template strings provides a new way. You just go to the next line and the text will be displayed in next line.



Discussion

No Comment Found