Code QuizIntermediate

Parameter Property Missing Modifier

Spotting why a constructor shorthand parameter never becomes a class property.

Codetypescript
class User {
  constructor(name: string) {}

  greet() {
    return `Hello, ${this.name}`;
  }
}

const u = new User("Ada");
console.log(u.greet());

What is the bug in this code?