Code QuizIntermediate Calling a Static Member on an Instance
Spotting why a static method is not accessible through an instance.
Codetypescript
class MathUtil {
static square(n: number): number {
return n * n;
}
}
const m = new MathUtil();
console.log(m.square(4));What is the bug in this code?