broken code
fix for undefined being returned
This commit is contained in:
parent
e4ad8d0810
commit
070c033dae
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue