Classes & prototypes
Computer Science · JavaScript
About this practice set
Classes & prototypes is part of Computer Science (JavaScript). Questions are generated with new numbers each time you practise. Levels available: Easy. After you answer, an explanation is shown.
Example questions
A taste of what you will practise. Answers are revealed after you try.
Easy
What does this JavaScript code log? class Cat { constructor() { this.legs = 4; } } const c = new Cat(); console.log(c.legs)