JS
challenger
Home
Intermediate JavaScript
classes
Track Instances with a Static Property
Track Instances with a Static Property
The class
Widget
should keep a count of how many instances have been created. Add a static property
count
that starts at 0 and increment it inside the constructor.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console