Class SomeClass {
myFunction() {
console.log('Hello, World');
}
}
for (let obj in SomeClass.prototype) {
console.log(obj);
}
Hi everyone, I am trying to loop over class’s prototype but it’s not working, it doesn’t give an error loop just won’t execute, I tried running this code in dev tools same situation, what’s wrong here, how do I loop over prototype object?