Vidyalelo
JavaScript · Q69

Invocation And Performance Navigation

Programming · JavaScript · question 69

Q69

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);
Answer
C.
s.on("error",f);
D.
s.on("default",f);

Answer: Option B

Solution

Answer: Option B
Solution:
The above code snippet gets “end” event fired on EOF when no more data will arrive.