Skip to content
Quiz · Classes · lesson 2 of 12

Quiz — a field with no value

What does tsc report for this code?

TypeScript
class Counter {
    count: number;
    step: number = 1;
}

const c = new Counter();
console.log(c.count, c.step);