jslint previously warned against unescaped literal "-" in regexp.

however, escaping "-" together with unicode flag "u", causes syntax error
in chrome/firefox/edge (and jslint has since removed warning):

```javascript
let rgx = /\-/u
VM21:1 Uncaught SyntaxError: Invalid regular expression: /\-/: Invalid
escape
    at <anonymous>:1:10
```

just, curious on reason why above edge-case is a syntax-error?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to