EssentialTypeScriptBook icon indicating copy to clipboard operation
EssentialTypeScriptBook copied to clipboard

getNextId() += 0 ?

Open robin-raymond opened this issue 9 years ago • 2 comments

https://github.com/jchadwick/EssentialTypeScriptBook/blob/master/manuscript/05.Classes.md

TodoService.getNextId = function() {
    return TodoService.lastId += 0;
}

Is += 0 intentional? I assume you meant += 1? If not then I'm unclear why it would need to have the += 0.

robin-raymond avatar Jun 12 '16 13:06 robin-raymond

No, you're right. Should be += 1. Thanks for all the fixes!!

jchadwick avatar Jun 12 '16 14:06 jchadwick

@jchadwick Welcome! I'm throughly enjoying the book. I know it's difficult as a self-publisher to catch all the errors so I hope you don't mind me producing the nits + feedback!

robin-raymond avatar Jun 12 '16 14:06 robin-raymond