InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
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() |
|
| 52. |
What is the command to run the node programs?(a) node(program.js)(b) program.js(c) node program.js(d) node.program.jsThis question was posed to me during a job interview.This question is from Asynchronous I/O with Rhino topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct answer is (c) NODE PROGRAM.js |
|
| 53. |
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 |
|
| 54. |
Which is a fast C++ based JavaScript interpreter?(a) Node(b) Sockets(c) Processors(d) ClosuresThe question was posed to me in an online quiz.Question is from Asynchronous I/O with Rhino topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» CORRECT choice is (a) Node The best explanation: Node.js is an open-source, cross-platform JavaScript run-time environment that EXECUTES JavaScript code OUTSIDE of a browser. Node is a fast C++-based JavaScript interpreter with bindings to the low-level Unix APIs for working with processes, files, NETWORK sockets, etc., and ALSO to HTTP client and server APIs. |
|
| 55. |
The JavaScript classes can be instantiated using _____ operator.(a) create(b) new(c) instantiate(d) create.newThis question was posed to me in an internship interview.The doubt is from Scripting Java with Rhino topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct answer is (B) new |
|
| 56. |
What does Rhino do when the getter and setter methods exist?(a) It becomes JavaScript properties(b) Java classes are used to avoid them(c) Java classes & JavaScript properties(d) It act as javascript functionI have been asked this question in an interview for internship.The doubt is from Scripting Java with Rhino in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct OPTION is (a) It becomes JavaScript PROPERTIES |
|
| 57. |
Which is a more formal way of importing packages and classes as JavaScript objects?(a) import(java.util.*);(b) importClass(java.util.*);(c) import.Class(java.util.*);(d) Class.import(java.util.*);The question was asked in exam.This interesting question is from Scripting Java with Rhino topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right option is (b) importClass(java.util.*); |
|
| 58. |
Which is a useful way to try out small and simple Rhino programs and one-liners?(a) Starting an interactive shell(b) Starting a one to one shell(c) Creating a thread to do simple programs(d) Starting a multiple shellThe question was posed to me in an online quiz.My doubt stems from Scripting Java with Rhino topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right answer is (a) Starting an interactive shell |
|
| 59. |
Which Rhino command quits Rhino environment?(a) terminate()(b) exit()(c) quit()(d) close()The question was asked in examination.This is a very interesting question from Scripting Java with Rhino in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The CORRECT option is (c) quit() |
|
| 60. |
What is the method used to pause “data” events?(a) s.pause();(b) s.stop();(c) s.halt();(d) s.wait();I had been asked this question in an interview.Question is from Server-Side JavaScript in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right CHOICE is (a) s.pause(); |
|
| 61. |
Which of the following reads the textual contents of a URL and returns as a string?(a) spawn(f);(b) load(filename,…);(c) readFile(file);(d) readUrl(url);I got this question by my school teacher while I was bunking the class.My doubt stems from Scripting Java with Rhino in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» CORRECT answer is (d) readUrl(url); Best EXPLANATION: Rhino defines a HANDFUL of IMPORTANT global functions that are not PART of core JavaScript in which readUrl(url) reads the textual contents of a URL and return as a string. |
|
| 62. |
Which of the following are global functions that are not part of core JavaScript?(a) spawn(f);(b) trim();(c) exult();(d) eval()The question was asked during an interview.I'd like to ask this question from Scripting Java with Rhino topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The CORRECT ANSWER is (a) SPAWN(f); |
|
| 63. |
When the “end” event fires on EOF when no more data will arrive, which function is called?(a) s.on(“data”,f);(b) s.on(“end”,f);(c) s.on(“error”,f);(d) s.on(“default”,f);I got this question by my college director while I was bunking the class.My question is based upon Server-Side JavaScript topic in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right ANSWER is (b) s.on(“end”,F); |
|
| 64. |
Rhino is originated by _______(a) Microsoft(b) Mozilla(c) Apple(d) ChromeThis question was posed to me during an online interview.My question is based upon Scripting Java with Rhino topic in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The CORRECT option is (b) Mozilla |
|
| 65. |
Which among the following POSIX signals generate events?(a) SIGDOWN(b) SIGFLOAT(c) SIGINT(d) SIGSHORTI have been asked this question in final exam.This question is from Server-Side JavaScript topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct option is (c) SIGINT |
|
| 66. |
Which of the following is an event emitter?(a) once(b) process(c) listeners(d) onI had been asked this question in an international level competition.Origin of the question is Server-Side JavaScript in section Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Right answer is (b) process |
|
| 67. |
What is the function used to remove all handlers for name events?(a) deleteAllListeners(name)(b) deleteListener(name,f)(c) removeListener(name,f)(d) removeAllListeners(name)The question was asked in an interview for job.My question comes from Server-Side JavaScript topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct answer is (d) removeAllListeners(NAME) |
|
| 68. |
Which function is a synonym for on()?(a) addListener()(b) listeners()(c) once()(d) add()I got this question in class test.I'm obligated to ask this question of Server-Side JavaScript topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct choice is (a) addListener() |
|
| 69. |
When do uncaught exceptions generate events?(a) When handlers are registered(b) When handlers are deregistered(c) When handler functions are called(d) When handlers do not have a matching catch clauseThis question was addressed to me in an international level competition.This interesting question is from Server-Side JavaScript in portion Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct OPTION is (a) When HANDLERS are registered |
|
| 70. |
What are the events generated by the Node objects called?(a) generators(b) emitters(c) dispatchers(d) higheventsI have been asked this question by my school teacher while I was bunking the class.Origin of the question is Server-Side JavaScript in division Server-Side and Client-Side Scripting of JavaScript |
|
Answer» Correct choice is (B) EMITTERS |
|
| 71. |
What is the function used to deregister event handler ‘f’?(a) deleteAllListeners(name)(b) deleteListener(name,f)(c) removeListener(name,f)(d) removeAllListeners(name)This question was addressed to me in an interview for internship.This is a very interesting question from Server-Side JavaScript topic in chapter Server-Side and Client-Side Scripting of JavaScript |
|
Answer» The correct answer is (C) removeListener(name,F) |
|