I stumbled upon this snippet of code
var person = {
name: "joseph",
age: 33,
favSong: function killingInTheTameOf(){
this.lyrics = "Those who died are justified";
}
};
document.write(person.lyrics); //doesn't work
My curiosity lies with the this.lyrics variable,
what is the significance of this?
how can I access it?
what exactly does this refer to? Is it person?
I have come across explanations about this before, but none seem to address this particular scenario.