javascript-allonge-six
javascript-allonge-six copied to clipboard
`the problem with state` snippet output
First of all thank you for this wonderful book! I bought it after having read about half of it on learnpub. It is the best javascript book I found so far!
Under the subsection the problem with state of Stateful Method Decorators section, the code
musician.fullName() //=> Raymond Smullyan
is incorrect - the statement actually returns TypeError: Cannot read property 'fullName' of undefined. This is because once being called for the 2nd time returns undefined and hence musician is undefined.