Code QuizIntermediate

Optional Class Properties

Spot the incorrect syntax used to declare an optional class property in TypeScript.

Codetypescript
class User {
  name: string;
  email: string?;

  constructor(name: string) {
    this.name = name;
  }
}

What is the bug in this class declaration?