Published on

Using triple backticks

Authors
  • avatar
    Name
    hwahyeon
    Twitter

I wanted to highlight a line of code using backticks (`), but the code itself contains backticks, which caused issues. The solution is to use triple backticks (```) to enclose the code.

For example, this does not work:

`clockTitle.innerHTML = `${daysStr} ${hoursStr} ${minutesStr} ${secondsStr}``;

Instead, you should use triple backticks like this:

```clockTitle.innerHTML = `${daysStr} ${hoursStr} ${minutesStr} ${secondsStr}`;```