草庐IT

showFullName

全部标签

javascript - 深入理解 JavaScript : is it a class, 一个函数,还是一个变量?

我是JavaScript的初学者,我发现一个概念非常困惑。考虑以下代码:varperson={firstName:"Penelope",lastName:"Barrymore",//Sincethe"this"keywordisusedinsidetheshowFullNamemethodbelow,andtheshowFullNamemethodisdefinedonthepersonobject,​//"this"willhavethevalueofthepersonobjectbecausethepersonobjectwillinvokeshowFullName()​showF

javascript - 深入理解 JavaScript : is it a class, 一个函数,还是一个变量?

我是JavaScript的初学者,我发现一个概念非常困惑。考虑以下代码:varperson={firstName:"Penelope",lastName:"Barrymore",//Sincethe"this"keywordisusedinsidetheshowFullNamemethodbelow,andtheshowFullNamemethodisdefinedonthepersonobject,​//"this"willhavethevalueofthepersonobjectbecausethepersonobjectwillinvokeshowFullName()​showF