Contents

Which Rhino command quits Rhino environment?
a) terminate()                      
b) exit()
c) quit()                                 
d) close()

c

Explanation: quit() is a predefined command in rhino. The quit() command makes Rhino exit.


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 shell

a

The JavaScript classes can be instantiated using……….. operator.
a) create                                               
b) new
c) instantiate                        
d) create.new

b

Explanation: New is a keyword in JavaScript which is used to define new models. New operator is used to create new instance of the class.


The new Java arrays can be created into JavaScript programs using which of the following classes?
a) java.Array                       
b) java.lang.*
c) java.lang.Array
d) java.lang.reflect.Array

d

Explanation: There is no natural JavaScript syntax that Rhino can extend to allow JavaScript programs to create new Java arrays, so you have to do that using the java.lang.reflect.Array class.


Which is a fast C++ based JavaScript interpreter?
a) Node                                 
b) Sockets
c) Processors                        
d) Closures

a

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.


Why does the Node rely on event handlers?
a) APIs are synchronous
b) APIs are asynchronous
c) APIs are reusable
d) APIs are modular

b

Explanation: 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.