in Education by
Which of the following method loads a new document? (a) location.new() (b) loadnew() (c) location.load() (d) location.assign() This question was addressed to me in an online interview. My question comes from Creating a Shared Configuration File using JavaScript topic in section 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 option is (d) location.assign() To elaborate: The window.location object can be written without the window prefix. Some examples are window.location.href returns the href (URL) of the current page window.location.hostname returns the domain name of the web host.

Related questions

0 votes
    What is the syntax of close method for document object? (a) Close(object) (b) Close(doc) (c) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    A series RLC circuit has a resonance frequency of 1 kHz and a quality factor Q = 100. If each of R, L ... Questions for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 17, 2021 in Education by JackTerrance
0 votes
    Which of the following is the ultimate element selection method? (a) querySelectorAll() (b) querySelector() ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    To which of the following object does the print() method belong to? (a) window (b) document (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which of the following is not a navigator method? (a) postEnabled (b) reference (c) preference (d ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which method facilitates in uploading a Blob to a server? (a) send() (b) pass() (c) upload() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Which method is used to obtain the drawing context object? (a) getContext() (b) getObject() (c ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    What is the returning value of the getContext() method? (a) Drawing model (b) CanvasRenderingContext2D ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
...