Understanding the "this" keyword for objects in JavaScript
Hello guys, can someone explain why it is important to use the "this" keyword here, what would happen if we omit it please.
Also, I notice that when we create a class, for e.g. say
Also, I notice that when we create a class, for e.g. say
class Person {. . .}, in this case, I don't remember we would have use the keyword this. I know that the this keyword is use to reference the current object but in the example below, don't we have a single object? So can't we omit the "this" keyword?