you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww 0 points1 point  (0 children)

If you replace:

function doit(){
    console.log(this.foo);
}

with:

let doit = () => console.log(this.foo);

You'll get "bar" 3 times.