Insights - abukhalil-LTUC-ASAC/amman-401d4 GitHub Wiki
Just a couple to infer from the previous course
These questions represent some knowledge you might already have, considering the path you have reach so far, going into 401!
Why would you want to run JavaScript code outside of a browser?
A couple of reasons include testing functions and scripts, working on a full API using the terminal to view the output, and the benefit of having lightweight and independent platform to do so.
What is the difference between a module and a package?
a package is a bunch of modules that work with each other, a module has a standalone functionality that can operate independently but not on a useful manner, packages contain these modules and other scripts as dependencies but only some relatively large modules could contain a basic dependency.
What does the node package manager do?
Node package manager does as it is named, by managing packages, their dependencies, check for updates and install when needed, along with sponsorship letters when asked for by the developer!
export a function from a node module.
Provide code snippets showing 3 different ways toThese would be done using:
1 - module.exports = 'Hello world';
then var msg = require('module');
the whole file as literal with msg.
2 - exports.SimpleMessage = 'Hello world';
then var msg = require('./module.js');
the object file with msg.SimpleMessage.
3 - msg.log('Hello World');
with the following export allows to directly expose a function and operate on it.
module.exports.log = function (msg) {
console.log(msg);
};
Documentation and Vocabs
Feels like highschool again, but I am sure its beneficial to search and know them rather than skimming the terms.
Digital Ecosystem
With a well defined article
"They include documentation that you reference, API's that you use, an IDE (if you use one), the libraries you utilize, and possibly even the OS you use."
Node.js
The usual open-source server side runtime environment built on Chrome's V8 JavaScript engine.
V8 Engine
A copy paste definition as an open-source JavaScript engine developed by The Chromium Project for Google Chrome and Chromium web browsers. Its notable that it compiles into x86 and ARM architecture that both PC and mobile uses exclusively.
Server is the machine that acts to serve and respond to requests, handle the logic and be free as much as possible from other unnecessary usage that is usually considered when you own a computer.
Environment
Is defined well here.
"The term programming environment is sometimes reserved for environments containing language specific editors and source level debugging facilities; here, the term will be used in its broader sense to refer to all of the hardware and software in the environment used by the programmer. All programming can therefore be properly described as takin place in a programming environment."
Interpreter and compiler
They work different from each other, where the compiler would take high level code into machine code then executes it, an interpreter would skip that step and executes directly, but they are not exclusive and might overlap depending on the context of work. Best read in the WIKI.