MY #100 DAYS OF CODE CHALLENGE JOURNEY-DAY 11
We are still on my 100days of code challenge journey. As my learning of JavaScript ES6 continues, I learned the amazing functions of a template literal.
Template literal is an alternative for outputting without using single or double quotes. It uses a backtick and makes printing on screen easily manipulated.
Example
If we were to write the above output using single or double quotes we will require a newline character \n to print "school" on a new line.`go to
school`\\prints go to
\\prints school
Template literal also makes it possible to use a placeholder(${name}), a dollar sign followed by two curly brackets inside a string without the need to concatenate.
Example
var name = "Wright";
``my firstname is ${name}`
// Prints my firstname is Wright