Vidyalelo
JavaScript · Q68

Parsing, Benchmarking And Logging

Programming · JavaScript · question 68

Q68

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

A.
spawn(f);
B.
load(filename,…);
C.
readFile(file);
D.
readUrl(url);
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
Rhino defines a handful of important global functions that are not part of core JavaScript in which readUrl(url) reads the textual contents of a URL and return as a string.