Skip to content

Commit 3adcc2c

Browse files
sney2002frappacchio
authored andcommitted
return true on save method to continue chaining
The save method isn't returning this, so the car variable is equal to undefined instead of a Car object. BTW, Thanks alot for this guide.
1 parent deef735 commit 3adcc2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,8 @@ class Car {
15631563

15641564
save() {
15651565
console.log(this.make, this.model, this.color);
1566+
// NOTE: Returning this for chaining
1567+
return this;
15661568
}
15671569
}
15681570

0 commit comments

Comments
 (0)