1 Matching Annotations
- Aug 2022
-
javascript.info javascript.info
-
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}
-