Template Literals
What will be the output of console.log(`The sum is ${2 + 3}`);?
The output will be "The sum is 5". In a template literal, the expressions inside ${} are evaluated before being inserted into the string. In this case, 2 + 3 evaluates to 5, so the value 5 is converted to a string and inserted into the template literal. This string interpolation feature of template literals makes it much easier to include dynamic values in strings compared to traditional string concatenation. The JavaScript engine executes the expression, converts the result to a string using its ToString algorithm, and then constructs the final string with the expression result inserted in place of the placeholder.