1.

Why does the Node rely on event handlers?(a) APIs are synchronous(b) APIs are asynchronous(c) APIs are reusable(d) APIs are modularThis question was posed to me in an interview.The question is from Asynchronous I/O with Rhino in division Server-Side and Client-Side Scripting of JavaScript

Answer»

Correct answer is (b) APIs are asynchronous

The best I can EXPLAIN: For handling the spontaneous events occurring on the web page the EVENT handlers are IMPORTANT. Because the APIs are asynchronous, Node RELIES on event handlers, which are often implemented using nested functions and closures.



Discussion

No Comment Found

Related InterviewSolutions