Home / CSE / Javascript - CS :: Server Side and Client Side Scripting

CSE :: Javascript - CS

  1. What are the events generated by the Node objects called?

  2. A.

     generators

    B.

     emitters

    C.

     dispatchers

    D.

     highevents


  3. What is the function used to deregister event handler ‘f’?

  4. A.

     deleteAllListeners(name)

    B.

     deleteListener(name,f)

    C.

     removerListener(name,f)

    D.

     removeAllListeners(name)


  5. What is the function used to remove all handlers for name events?

  6. A.

     deleteAllListeners(name)

    B.

     deleteListener(name,f)

    C.

     removerListener(name,f)

    D.

     removeAllListeners(name)


  7. Which function is a synonym for on()?

  8. A.

     addListener()

    B.

     listeners()

    C.

     once()

    D.

     add()


  9. Which of the following is an event emitter?

  10. A.

     once

    B.

     process

    C.

     listeners

    D.

     on


  11. When do uncaught exceptions generate events?

  12. 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 clause


  • Which among the following POSIX signals generate events?

  • A.

     SIGDOWN

    B.

     SIGFLOAT

    C.

     SIGINT

    D.

     SIGSHORT


  • What is the method used to pause “data” events?

  • A.

     s.pause();

    B.

     s.stop();

    C.

     s.halt();

    D.

     s.wait();


  • 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);


  • What will be the return value of the write() method when the Node cannot write the data immediately and has to buffer it internally?

  • A.

     0

    B.

     1

    C.

     True

    D.

     False