JavaScript
31.1K subscribers
1.22K photos
10 videos
33 files
894 links
A resourceful newsletter featuring the latest and most important news, articles, books and updates in the world of #javascript 🚀 Don't miss our Quizzes!

Let's chat: @nairihar
Download Telegram
CHALLENGE

function Foo(x) {
this.x = x;
return { x: x * 2 };
}

function Bar(x) {
this.x = x;
return 42;
}

const f = new Foo(5);
const b = new Bar(5);

console.log(f.x, b.x, f instanceof Foo, b instanceof Bar);