JSFiddle - React, Tailwind, and code Playground
by machty
JavaScript
// Chrome feature/bug: optimizing-away unreferenced
// arguments in functions.
var a = function() {
// Try evaluating `arguments` at this breakpoint,
// returns empty array in chrome (should be [1,2,3])
debugger;
};
var b = function() {
// But since arguments is referenced here, the optimization
// doesn't kick in, so eval'ing `arguments` yields
// the correct [1,2,3]. Extreme facepalms if you're
// debugging variable-argument functions.
arguments;
debugger;
};
function c() {
// arguments discarded here too.
debugger;
}
a(1,2,3);
b(1,2,3);
c(1,2,3);