Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
呼び出し元の引数を破壊する
function func1(b) {
func2();
console.log(b); // IEではfalse
}
function func2(fn) {
arguments.callee.caller.arguments[0] = false; // 破壊した!
}
func1(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment