Javascript (JS) Error Handling MCQ

This section focuses on the "Javascript Error Handling" of the Javascript. These Multiple Choice Questions (mcq) should be practiced to improve the Javascript skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. What is the code snippet to go back to a history thrice?

A. history(3);
B. history(-3);
C. history.go(-3);
D. history.go(3);

View Answer


2. What will be the output of the following JavaScript code?
function myfun()
{
document.getElementById ("demo").innerHTML = Boolean(21 > 15);
}

A. true
B. false
C. error
D. 0

View Answer


3. What will be the output of the following JavaScript code?
function myfun()
{
document.getElementById ("demo").innerHTML = Boolean(15.00 === 15);
}

A. true
B. false
C. error
D. 0

View Answer


4. What will be the output of the following JavaScript code?
var b5 = Boolean('false');
document.getElementById ("demo").innerHTML =b5;

A. true
B. false
C. error
D. undefined

View Answer


5. What will be the output of the following JavaScript code?
function myfun()
{
var a = "";
document.getElementById ("demo").innerHTML = Boolean(a);
}

A. true
B. false
C. error
D. undefined

View Answer


6. What will be the output of the following JavaScript code?
function myfun()
{
var a = null;
document.getElementById ("demo").innerHTML = Boolean(a);
} }

A. true
B. false
C. error
D. undefined

View Answer


7. The inner frame within a top-level window can be referred to as _____________

A. parent(parent)
B. parent.parent
C. parent*parent
D. parent/parent

View Answer


8. How are windows, tabs, iframes, and frames treated according to client-side javascript?

A. They are all browsing contexts
B. They are all browsing information
C. They are all Window contexts
D. They are all Window objects

View Answer


9. Each tab in the single web browser window is called as ____________

A. Browsing context
B. Browser Information
C. Both Browser Information & Browsing context
D. Browser Log

View Answer


10. When will the browser invoke the handler?

A. Program begins
B. Any event occurs
C. Specified event occurs
D. None of the above

View Answer






Also check :


Discussion


* You must be logged in to add comment.