In Node, let’s try to understand what the console is. This will be interesting trip down the internals of Node, too.
Node is two things: it’s an interpreter, and JS runtime. Let’s open those two things a bit:
Runtime is an environment, where you get a “process”, RAM memory, and some interfaces to the underlying actual computer that is running your program.
> console.log(typeof console) Object undefined
The typeof console is an Object. ‘typeof’ is an operator that returns a string, telling you what kind of Object it has seen.
- typeof 5 is ‘Number’
- typeof “thisname” is ‘string’
That’s however, the topic of the next blog post. Very soon.