I am new to JS and was learning classes in JS but I faced an error saying log is not defined. Here is the code:
class Keyboard {
log() {
return true;
}
print() {
log() ? "True" : "False";
}
}
const mir = new Keyboard();
mir.print();