You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently reading the PDF (nice work by the way!) and when I tested the code, line 351 worked which baffled me; after a couple of reads, I have realized I didn't have 'use strict'; at the very top of my file, which is not mentioned anywhere in the book.
logger.level; // returns the `level` because of the getter `level()`
logger.#level; // throws error
logger.#level =LogLevel.Warn; // throws error
logger.level=10; // throws error
```
Perfect! This all looks really good. We are confident that neither clients nor our own library's code will affect the internals of the library. Please note that only the `#level` member variable can be changed from within the class Logger's scope, which is exactly what we want.
The text was updated successfully, but these errors were encountered:
I'm currently reading the PDF (nice work by the way!) and when I tested the code, line 351 worked which baffled me; after a couple of reads, I have realized I didn't have
'use strict';
at the very top of my file, which is not mentioned anywhere in the book.learn-nodejs-hard-way/chapters/ch04.0-logtar-our-logging-library.md
Lines 340 to 354 in 33b587c
The text was updated successfully, but these errors were encountered: