We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0ae835e + 070c033 commit 22446ebCopy full SHA for 22446eb
1 file changed
1-js/07-object-oriented-programming/08-class-patterns/article.md
@@ -76,7 +76,7 @@ Like this:
76
function User(name, birthday) {
77
// only visible from other methods inside User
78
function calcAge() {
79
- new Date().getFullYear() - birthday.getFullYear();
+ return new Date().getFullYear() - birthday.getFullYear();
80
}
81
82
return {
0 commit comments