티스토리 뷰

728x90
반응형
var user = {
    name: "John",
    surname: "Smith",

    get fullName() {
        return `${this.name} ${this.surname}`;
    },
  
    set fullName(value) {
        [this.name, this.surname] = value.split(" ");
    },

    Temp : function() {
        return "sdfsdf";
    }    
};
728x90
반응형