\), it will escape the character after it. However, there are cases where you might not want this behavior (e.g. when you want to store a Windows path as a string). For these cases, you can use a template literal and the
String.raw() tag function:
const path = `C:\web\index.html`; // 'C:web.html' const unescapedPath = String.raw`C:\web\index.html`; // 'C:\web\index.html'
A collection of quick tips and tricks to level up your coding skills one step at a time.
Ever wanted to get the value of an HTML input element as a number? Learn an easy way to do it with this handy trick.
Regular expressions are a very useful tool in a variety of situations. Save this cheatsheet for any time you need to look up their syntax and speed up your development.