• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

Node JS Exam Latest Updated Graded A+

Document preview thumbnail
Preview 1 out of 3 pages

Node JS Exam Latest Updated Graded A+

Content preview

Node JS Exam Latest Updated Graded A+
.pipe() - ANSWER-a function that takes a readable source stream and outputs to a
writable stream

are for loops and async callbacks compatible? - ANSWER-not really, need to use
recursion instead

async.forEachSeries - ANSWER-iterates over every element in the provided array,
calling the given function for each

aync.auto function - ANSWER-lets you mix ordered and unordered functions together
into one powerful sequence of functions

can you chain multiple .pipe()'s together - ANSWER-yes

console.assert(cond, message) - ANSWER-if cond evaluates to false, throw an
AssertionFailure exception

create a module that prints out "Hello World" - ANSWER-exports.hello_world = function
() {
console.log("Hello World");
}

exports object - ANSWER-a special object created by the Node module system in every
file you create and is returned as the value of the require function when you include the
module

four core REST operations - ANSWER-get, put, post, delete

fs.readdir(file, callback) - ANSWER-returns all items in the given folder except for "."
and ".."

GET /albums/italy2012.json - ANSWER-the request returns this album

how do you handle a situation where you are losing the this pointer? - ANSWER-
enclose the function within a function, then assign self to this (var self = this;). this
preserves this via closures in function scope

How to load script to Node REPL? - ANSWER-.load foo.js from within Node REPL

If functions return immediately, why doesn't the node process exit immediately after the
function has returned? - ANSWER-Node operates on an event queue; if there are
pending events awaiting a response, it doesn't exit until your code has finished
executing AND there are no events left in the queue

Document information

Uploaded on
May 15, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CLOUNDLite
3.9
(132)
Sold
669
Followers
389
Items
12457
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions