1 Matching Annotations
  1. Aug 2022
    1. The main difference between these two syntaxes is that pattern using slashes /.../ does not allow for expressions to be inserted (like string template literals with ${...}). They are fully static

      This is the main difference between creating a regular expression by using slashes /<here your reg exp>/ and creating a new instance of RegExp() class. You cannot use literal template ${varSubstitution}