RxJSInAction / rxjs-in-action

Code sample repository
133 stars 59 forks source link

It prints USDMoney object instead of its amount #11

Closed okpc-okpc closed 7 years ago

okpc-okpc commented 7 years ago

Hi! You need to invoke toString() method on a newly created USDMoney object on line 28. Because now it's printing the object and I guess you want to more valuable output. The same case in the next listing (4_5.js).

Or is it tricky don't_copypaste_blindly game for readers?🙂

luijar commented 7 years ago

lol. You're right, it's a lot more valuable to use toString for a better-formatted string. We were more focused on the showcasing the concept. :-) Thanks!

okpc-okpc commented 7 years ago

Oh, I thought that the issue would reference file where I found the problem, so I didn't point you to the particular path in repo, sorry about that. I'm talking about rxjs-in-action/examples/4/4/4_4.js and rxjs-in-action/examples/4/5/4_5.js

Cheers!

paulpdaniels commented 7 years ago

Good catch! I'll update the source with a note for everyone using the repo.