in Education by
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); This question was addressed to me at a job interview. Query is from Remote Logging topic in chapter Parsing, Benchmarking and Logging of JavaScript Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The correct choice is (d) readUrl(url); The best explanation: readUrl() opens an input connection to the given string url, read all its bytes and convert them to a string using the specified character coding or default character coding if an explicit coding argument is not given.

Related questions

0 votes
0 votes
    The URL property belongs to which of the following object? (a) Document (b) Element (c) Location ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of the following methods returns proxy object? (a) loadDatabase() (b) getDatabase() (c) load( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following Node object property returns the node immediately before a node? (a) previousSibling ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which of the following key property holds the key name as a string? (a) keyName (b) key (c) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
0 votes
    How will you update the URL displayed in the location bar? (a) location (b) location.URL (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these is used to read a string from the input stream? (a) get() (b) getLine() (c ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these methods can be used to output a string in an applet? (a) display() (b) print() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...