Skip to content

Commit 037a73f

Browse files
committed
fixed an undefined problem for a function
1 parent df7977f commit 037a73f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

assignments/objects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ console.log(parent.child.age)
144144
console.log(parent.child.grandchild.name,parent.child.grandchild.age)
145145

146146
// Have the parent speak
147-
console.log(this.speaks+this.name)
147+
console.log(`${parent.speaks} ${parent.name}`)
148148

149149
// Have the child speak
150150
console.log (`${parent.child.speaks+parent.child.name} !`)

0 commit comments

Comments
 (0)