5.
What is the output of the following code?
const speed = 'quick';
console.log(`The ${speed} brown fox jumps over the lazy dog.`)
Error message.
The "quick" brown fox jumps over the lazy dog.
The ${speed} brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
Correct: D
In ES6, template literals are used for strings embedding expressions. These are enclosed by back-tick (` `) characters instead of quotes. The ${expression} syntax is used to inject variables directly into a string. Hence the expression ${speed} will be replaced by the value of the speed variable which is quick. So, The final output is The quick brown fox jumps over the lazy dog.