We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d189bf3 commit 1c38e5cCopy full SHA for 1c38e5c
OO/createObject.html
@@ -118,18 +118,18 @@
118
119
120
//【稳妥构造函数模式】
121
-function Person(name, age) {
122
- var o = new Object();
+// function Person(name, age) {
+// var o = new Object();
123
124
- o.sayName = function() {
125
- console.log(name);
126
- };
+// o.sayName = function() {
+// console.log(name);
+// };
127
128
- return o;
129
-}
+// return o;
+// }
130
131
-var friend = Person('Nicholas', 29);
132
-friend.sayName();
+// var friend = Person('Nicholas', 29);
+// friend.sayName();
133
134
135
</script>
0 commit comments