Search test library by skills or roles
⌘ K

Adaface Sample NodeJS Questions

Here are some sample NodeJS questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Medium

I/O cycle and main module
Event Loop
Solve
Review the following NodeJS code:
 image
Pick the correct statements:
            
            A: X will be logged after Y always
            B: Y will be logged after X always
            C: The order of executing timeout and immediate callbacks is non-deterministic and is bound by the performance of the process
            D: In this case, the function calls are scheduled in the main module and not in the I/O cycle
            E: In this case, the function calls are scheduled in the I/O cycle so setImmediate is always executed before any timers scheduled in the I/O phase, independently of how many timers are left

Medium

Res methods
Solve
If none of the methods (res.download, res.end, res.json, res.jsonp, res.redirect, res.render, res.send, res.sendFile, res.sendStatus) are called from a route handler to terminate request response cycle, what happens to the the client request?
            A) Will be left hanging indefinitely
            
            B) Will get an internal server error - 500 
            
            C) Will get a service unavailable error - 503
            
            D) Will be left hanging for a while and then request timeout error - 408

Medium

Phases and Timers
Event Loop
Solve
Review the following NodeJS code:
 image
Pick the correct statements:
            
            A: Adaface will be logged after Lovelace.
            B: Lovelace will be logged after Adaface.
            C: Once the asyncOpThatTakes195ms completes reading the file, it starts executing the callback which takes 10 seconds. Only after this is finished, the event loop will execute the timers that are finished. So the timeout call back will actually be executed after 205 ms even though it is scheduled to be run after 200 ms
            D: Once the asyncOpThatTakes195ms completes reading the file, it starts executing the callback. While executing the callback, the scheduled timer becomes ready to be executed. So the runtime executes the timer and then completes processing the callback.
🧐 Question🔧 Skill

Medium

I/O cycle and main module
Event Loop
2 mins
NodeJS
Solve

Medium

Res methods
3 mins
NodeJS
Solve

Medium

Phases and Timers
Event Loop
2 mins
NodeJS
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
I/O cycle and main module
Event Loop
NodeJS
Medium2 mins
Solve
Res methods
NodeJS
Medium3 mins
Solve
Phases and Timers
Event Loop
NodeJS
Medium2 mins
Solve

Adaface questions are trusted by enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great default library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
Join 1200+ companies in 75+ countries.
Try the most candidate friendly skills assessment tool today.
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
Chat with us
40 min tests.
No trick questions.
Accurate shortlisting.
Ada
Ada
● Online
Previous
Score: NA
Next
✖️