301 Class Six Reading Notes “NODE.JS”
Node.js is an event-based, non-blocking, asynchronous I/O runtime that uses Google’s V8 JavaScript engine and libuv library. Hmmm, “event-based”, “non-blocking”, “asynchronous I/O” — that’s quite a lot to digest in one go.
Node Is Built on Google Chrome’s V8 JavaScript Engine
The V8 engine is the open-source JavaScript engine that runs in Google Chrome and other Chromium-based web browsers, including Brave, Opera, and Vivaldi. It was designed with performance in mind and is responsible for compiling JavaScript directly to native machine code that your computer can execute. However, when we say that Node is built on the V8 engine, we don’t mean that Node programs are executed in a browser. They aren’t. Rather, the creator of Node (Ryan Dahl) took the V8 engine and enhanced it with various features, such as a file system API, an HTTP library, and a number of operating system–related utility methods. Node.js is a program that executes JS on our xcomputers Is very compatible as you target just one specific version of the V8 engine and that allows you to use the most modern syntax or something lower if you choose.
Questions:
- What is node.js? It is a JavaScript runtime run on chromes v8 engine.
- In your own words, what is Chrome’s V8 JavaScript Engine? It compiles JavaScript directly to the user’s computer that it can execute.
- What does it mean that node is a JavaScript runtime? It is where the program is actually executed.
- What is npm? It is a packet manager set as default for Node.js.
- What version of node are you running on your machine? version 18.8.0
- What version of npm are you running on your machine? npm -v returned 8.18.0
- What command would you type to install a library/package called ‘jshint’? npm install -g jshint for a global install
- What is node used for? Node is used to generate the runtime scripts and you can run them on the server.
- What are the 6 reasons for pair programming?
- greater efficency
- engaged collaboration
- learning from your peers
- improve social skills
- prepare for job interviews
- work environment readiness
- In your experience, which of these reasons have you found most beneficial? For me it has been learning from my classmates and that two brains face roadblocks than one brain.
- How does pair programming work? In previous Code Fellows courses we used the driver and navigator concept of peer programming. One person types what the other person suggests code should be.
Resources
-Utube Video with Mosh on Node.js