Node Flashcards
What is Node.js?
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. In the following “hello world” example, many connections can be handled concurrently. Upon each connection, the callback is fired, but if there is no work to be done, Node.js will sleep.
What can Node.js be used for?
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. In the following “hello world” example, many connections can be handled concurrently. Upon each connection, the callback is fired, but if there is no work to be done, Node.js will sleep.
What is a REPL?
1
When was Node.js created?
1
What back end languages have you heard of?
1
What is a computer process?
a process is the instance of a computer program that is being executed by one or many threads
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
300+
What is the process object in a Node.js program?
The process object is the global object in Node. It can be accessed from anywhere; it is an instance of EventEmitter. Each Node. js has a set of built-in functionality, accessible through the global process objec
How do you access the process object in a Node.js program?
console.log(process)
What is the data type of process.argv in Node.js?
objects
What is the data type of process.argv in Node.js?
arrays of string
What is a JavaScript module?
1
What values are passed into a Node.js module’s local scope?
1
Give two examples of truly global variables in a Node.js program.
1
What is the purpose of module.exports in a Node.js module?
to export and use different js file in program
How do you import functionality into a Node.js module from another Node.js module?
call the required function with the other file URL
What is the JavaScript Event Loop?
An event loop is something that pulls stuff out of the queue and places it onto the function execution stack whenever the function stack becomes empty.
What is different between “blocking” and “non-blocking” with respect to how code is executed?
blocking means is something in call stack
non blocking is something that is push from queue to call stack
What is a relative file path?
represt path form current director
What is an absolute file path?
Represent path from root
What module does Node.js include for manipulating the file system?
fs modules
What method is available in the Node.js fs module for writing data to a file?
Write
Are file operations using the fs module synchronous or asynchronous?
dd