I'm just thinking in JavaScript I can do this:
let s = "abc" + "def";
Why can't I do: let regExp = /abc/ + /def/;
If JavaScript (or some other) interpreter can turn
/abc/ into a RegExp, why can't it do the same for/abc/ + /def/
?
I'm just thinking in JavaScript I can do this:
let s = "abc" + "def";
Why can't I do: let regExp = /abc/ + /def/;
If JavaScript (or some other) interpreter can turn
/abc/ into a RegExp, why can't it do the same for/abc/ + /def/
?