Skip to content

Commit 6318a45

Browse files
authored
Update class.md
如果只写返回``my name is ${name}``会报 `ReferenceError: name is not defined`~
1 parent 33b32e5 commit 6318a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

advanced/class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ class Animal {
347347
this.name = name;
348348
}
349349
sayHi(): string {
350-
return `My name is ${name}`;
350+
   return `My name is ${this.name}`;
351351
}
352352
}
353353

0 commit comments

Comments
 (0)