1.

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);The question was asked during a job interview.Origin of the question is Script Loading topic in division Invocation and Performance Navigation of JavaScript

Answer»

Right choice is (b) s.on(“end”,f);

The explanation is: In COMPUTING, end-of-file (commonly ABBREVIATED EOF) is a condition in a computer operating system where no more DATA can be read from a data source. The above code snippet GETS “end” EVENT fired on EOF when no more data will arrive.



Discussion

No Comment Found

Related InterviewSolutions