1.

What is the alternative command used in Node for load()?(a) store()(b) module()(c) log()(d) require()I have been asked this question during an interview.I'd like to ask this question from Asynchronous I/O with Rhino topic in division Server-Side and Client-Side Scripting of JavaScript

Answer»

Right choice is (d) require()

To elaborate: require() is used for including other javascript files. Use require() instead of LOAD(). It loads and EXECUTES (only once) the NAMED module, returning an OBJECT that contains its exported symbols.



Discussion

No Comment Found

Related InterviewSolutions