Hacker News new | ask | show | jobs
by v413 4913 days ago
Point 7 is wrong.

Example:

a = {k: 10};

b = {k: 20};

var fn = function () {with (a) {this.k = 30;}};

fn.call(b);

console.log("a.k: ", a.k); // 10

console.log("b.k: ", b.k); // 30

1 comments

Thanks, not sure what I was smoking there.

I can't seem to go back and edit, though...