I am a beginner in JS and I just started learning about functions today and the W3C example
var myObject = {
firstName:"John",
lastName: "Doe",
fullName: function () {
return this.firstName + " " + this.lastName;
}
}
myObject.fullName(); // Will return "John Doe"
So W3C says "The thing called this, is the object that "owns" the JavaScript code. "
Can someone explains how this is an object and the concept of this
?
Thanks