broken code

fix for undefined being returned
This commit is contained in:
Aman Bangad 2017-06-02 10:10:37 -04:00 committed by GitHub
parent e4ad8d0810
commit 070c033dae

View file

@ -76,7 +76,7 @@ Like this:
function User(name, birthday) { function User(name, birthday) {
// only visible from other methods inside User // only visible from other methods inside User
function calcAge() { function calcAge() {
new Date().getFullYear() - birthday.getFullYear(); return new Date().getFullYear() - birthday.getFullYear();
} }
return { return {