Sail E0 Webinar

MCQs

Total Questions : 10
Question 1. What is the alternative command used in Node for load()?
  1.    store()
  2.    module()
  3.    log()
  4.    require()
 Discuss Question
Answer: Option D. -> require()


Use require() instead of load(). It loads and executes (only once) the named module, returning an object that contains its exported symbols.


Question 2. Which of the following are not advanced services?
  1.    Data storage
  2.    Networking
  3.    XMLHttpRequest object
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


All the above mentioned are advanced services.


Question 3. Which is the in-house library of Yahoo!?
  1.    Dojo
  2.    YUI
  3.    Prototype
  4.    Closure
 Discuss Question
Answer: Option B. -> YUI


YUI is the in-house library of Yahoo!, and it is used on their home page.


Question 4. What does Dojo and YUI have in common?
  1.    Facilitates DOM utilities and UI Widgets
  2.    Doesnot facilitates DOM utilities and UI Widgets
  3.    Client-side library
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> Facilitates DOM utilities and UI Widgets


Like Dojo, it is a large, all-encompassing library with language utilities, DOM utilities, UI widgets, and so on. There are actually two incompatible versions of YUI, known as YUI 2 and YUI 3.


Question 5. Among the below given functions, Node supports which of the following client-side timer functions?
  1.    getInterval()
  2.    Interval()
  3.    clearTime()
  4.    clearTimeout()
 Discuss Question
Answer: Option D. -> clearTimeout()


Node supports the client-side timer functions set setTimeout(), setInterval(), clearTimeout(), and clearInterval().


Question 6. One of the main advantage of using src attribute is
  1.    It becomes self-cached
  2.    It makes the HTML file modular
  3.    It restricts manipulation in the HTML file
  4.    It simplifies the HTML files
 Discuss Question
Answer: Option D. -> It simplifies the HTML files


The main advantage of using the src attribute is that it simplifies your HTML files by allowing you to remove large blocks of JavaScript code from them”that is, it helps keep content and behavior separate.


Question 7. Which identifier is used to represent a web browser window or frame?
  1.    frames
  2.    window
  3.    location
  4.    frame
 Discuss Question
Answer: Option B. -> window


The Window object is the main entry point to all client-side JavaScript features and APIs. It represents a web browser window or frame, and you can refer to it with the identifier window.


Question 8. Which handler is triggered when the content of the document in the window is stable and ready for manipulation?
  1.    onload
  2.    manipulate
  3.    create
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> onload


One of the most important event handlers is the onload handler of the Window object. It is triggered when the content of the document displayed in the window is stable and ready to be manipulated. JavaScript code is commonly wrapped within an onload event handler.


Question 9. When the "end event fires on EOF when no more data will arrive, which function is called?
  1.    s.on("data",f);
  2.    s.on("end",f);
  3.    s.on("error",f);
  4.    s.on("default",f);
 Discuss Question
Answer: Option B. -> s.on("end",f);


The above code snippet gets "end event fired on EOF when no more data will arrive.


Question 10. What does Rhino do when the getter and setter methods exist?
  1.    It becomes JavaScript properties
  2.    Java classes are used to avoid them
  3.    Both a and b
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> It becomes JavaScript properties


Rhino allows JavaScript code to query and set the static fields of Java classes and the instance fields of Java objects. Java classes often avoid defining public fields in favor of getter and setter methods. When getter and setter methods exist, Rhino exposes them as JavaScript
properties.


Latest Videos

Latest Test Papers