// 實字var obj1 = { name :"總裁實字", height :170,say:function(){return"I am "+obj1.name; } },result =obj1.say();// 建構式// js 沒有 class 概念,要用函式模擬functionPerson(name){// var this = {};this.name = name;this.say=function(){return"I am "+this.name; };// return this;};var adam =newPerson("海綿寶寶");console.log(adam.say());