adplus-dvertising
frame-decoration

Question

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

Answer: (b).s.on("end",f);

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. When the 'end' event fires on EOF when no more data will arrive, which function is called?

Similar Questions

Discover Related MCQs

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

Q. Rhino is originated by

Q. Which of the following are global functions that are not part of core JavaScript?

Q. Which of the following reads the textual contents of a URL and returns as a string?

Q. Which Rhino command quits Rhino environment?

Q. Which is a useful way to try out small and simple Rhino programs and one-liners?

Q. Which is a more formal way of importing packages and classes as JavaScript objects?

Q. Consider the following code snippet:

var f = new java.io.File("/tmp/test");
var out = new java.io.FileWriter(f);
out instanceof java.io.Reader

What will be the output for the above code snippet?

Q. What does Rhino do when the getter and setter methods exist?

Q. The JavaScript classes can be instantiated using _____ operator?

Q. The new Java arrays can be created into a JavaScript programs using which of the following classes?

Q. Which is a fast C++ based JavaScript interpreter?

Q. Why does the Node rely on event handlers?

Q. What is the command to run the node programs?

Q. What is the alternative command used in Node for load()?

Q. What is the command used for debugging output in Node?

Q. What is the code to print hello one second from now?

Q. Among the below given functions, Node supports which of the following client-side timer functions?

Q. The necessary globals of a node are defined under which namespace?

Q. Why does Node not block while waiting for operations to complete?