Gwon Honggwonhong.hashnode.dev·Dec 5, 2023[JavaScript] 생성자 함수(constructor function)을 통해 알아보는 closure, prototype, thisfunction Person(name, age, id) { var privateId = id; this.name = name; this.age = age; this.getPrivateId = function() { return privateId; } } var gwon = new Person("gwon", 100, 1234); console.log(gwon.name); // "gwon" co...103 readsJavaScriptAdd a thoughtful commentNo comments yetBe the first to start the conversation.