Why next code is valid Javascript code?
var global = (1,eval)('this');
alert(global);
That's because the comma operator returns its second operand (and evaluates both).
The code in your question is equivalent to:
1;
var global = eval('this');
alert(global);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With