One way is to use double backticks to wrap your code.
Example:
To display alert(`The sum is ${a + b}`);
, type ``alert(`The sum is ${a + b}`);``
.
But the double-tick approach will not work if you want to wrap an entire template string inside them, like this: `Sum: ${a + b}`
.
The trick here is to use triple backticks and a Zero-Width Space (ZWS) character. Example: ``[ZWS]`Sum: ${a + b}`[ZWS]``
.