I am trying to use the function in object literal to get a full name but am failing at it. The code I used can be seen below. What could I be doing wrong?
fullName function(){
return this.firstName +" "+this.lastName;
}
console.log(person.fullName());