re: How do template literals in JavaScript work under the hood? VIEW POST

FULL DISCUSSION
 

Thanks for the post!

And for the really brave, you can check out the c++ code:
github.com/nodejs/node/blob/57c708...

  // "should_cook" means that the span can be "cooked": in tagged template
  // literals, both the raw and "cooked" representations are available to user
  // code ("cooked" meaning that escape sequences are converted to their
  // interpreted values). Invalid escape sequences cause the cooked span
  // to be represented by undefined, instead of being a syntax error.
  // "tail" indicates that this span is the last in the literal.

Scary stuff 🙈

code of conduct - report abuse