Skip to content

Commit 22446eb

Browse files
authored
Merge pull request #585 from amanbangad/patch-4
broken code
2 parents 0ae835e + 070c033 commit 22446eb

File tree

1 file changed

+1
-1
lines changed
  • 1-js/07-object-oriented-programming/08-class-patterns

1 file changed

+1
-1
lines changed

1-js/07-object-oriented-programming/08-class-patterns/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Like this:
7676
function User(name, birthday) {
7777
// only visible from other methods inside User
7878
function calcAge() {
79-
new Date().getFullYear() - birthday.getFullYear();
79+
return new Date().getFullYear() - birthday.getFullYear();
8080
}
8181

8282
return {

0 commit comments

Comments
 (0)