Loading

T5 Modern JavaScript (ES6 and later) · Lesson 10

Games: Maps and sets

Choose the right option, fill in the blanks, write small pieces of code and fix broken ones. Code runs in a safe box inside this page.

Solved 0 of 45 items in this lesson.

1 / 21

What does this print?

const a = { n: 1 };
const b = { n: 2 };
const o = {};
o[a] = "x";
o[b] = "y";
console.log(Object.keys(o).length);

Back to the lesson