in javascript whay use " var that = this " -


Hello I am new to javascript

What is the benefit of using this line

var key = an

one example

  function person (first name, last name, age) {this.firstname = Firstname; This .lastname = lastname; This.age = age; Getfullname = function () {return firstname + â ???? a???? + Last name; } Var that = this; This psi = function () {document.write (â ???? Hi my name is ???? getfullname () + a ???? and i am a ??? + that.age + a ?? ?? years old; ??????); }}   

thanks

this The reference is sensitive using the ensures that when is called is called, then this this will return the value getfullname < / Code> was called <. / P>

Comments