📜  ex:java 脚本 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:54.607000             🧑  作者: Mango

代码示例1
var person = {
    fullName: function(city, country) {
        return this.firstName + " " + this.lastName  + "," + city + "," + country;
    }
}
var person1 = {
    firstName:"John",
    lastName: "Doe",
}
 person.fullName.call(person1, "Oslo", "Norway");