Why does Node not block while waiting for operations to complete?
a) Static
b) Asynchronous
c) Synchronous
d) Recursive
Explanation: Node executes the function the in one go without any waiting or blocking. Because the Node’s functions and methods are asynchronous, they do not block while waiting for operations to complete.
Which is the method used for registering handlers?
a) on()
b) register()
c) add()
d) include()
Explanation: The on() method attaches one or more event handlers for the selected elements and child elements. Node objects that generate events (known as event emitters) define an on() method for registering handlers.
The main purpose of JavaScript in web browser is to……….
a) Creating animations and other visual effects
b) User Interface
c) Visual effects
d) User experience
Explanation: JavaScript can help to facilitate that experience, for example by:
Creating animations and other visual effects to subtly guide a user and help with page navigation
Sorting the columns of a table to make it easier for a user to find what she needs
A JavaScript program can traverse and manipulate document content
through………….
a) Element Object
b) Document Object
c) Both Element and Document Object
d) Data object
Explanation: A JavaScript program can traverse and manipulate document content through the Document object and the Element objects it contains. It can alter the presentation of that content by scripting CSS styles and classes. The Element object represents an HTML element, like P, DIV, A, TABLE, or any other HTML element.
The behaviour of the document elements can be defined by………..
a) Using document object
b) Registering appropriate event handlers
c) Using element object
d) Using data element
The main purpose of JavaScript in web browser is to……….
a) Creating animations and other visual effects
b) User Interface
c) Visual effects
d) User experience
Explanation: JavaScript can help to facilitate that experience, for example by:
Creating animations and other visual effects to subtly guide a user and help with page navigation
Sorting the columns of a table to make it easier for a user to find what she needs