Code QuizIntermediate Property Type Annotation Mismatch
Identify the type-annotation error in this class property.
Codetypescript
class Product {
price: number;
constructor(price: number) {
this.price = price;
}
}
const p = new Product("19.99");
console.log(p.price);What is the bug in this code?