We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Anyone new to coding and JS know to include the extra backslash if declaring it as an object? I used a literal to answer after failing in frustration to get the object to work. Needed to google to get the backslash explanation. Would be nice if it was included in the solution as its a "first 10 days of JS" tutorial problem, as I didn't have the intuition upon seeing it to know why its needed.
Day 7: Regular Expressions II
You are viewing a single comment's thread. Return to all comments →
Anyone new to coding and JS know to include the extra backslash if declaring it as an object? I used a literal to answer after failing in frustration to get the object to work. Needed to google to get the backslash explanation. Would be nice if it was included in the solution as its a "first 10 days of JS" tutorial problem, as I didn't have the intuition upon seeing it to know why its needed.
vs.