3 ms·
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) inte
by galaxyLogic 4mo ago
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/
?