Q. Which of the following is the correct syntax for referring to an external script called "xxx.js"?

  • (A) <script src="xxx.js>
  • (B) <script src="xxx.js">
  • (C) <script name="xxx.js">
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) <script src="xxx.js">

Q. 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);
πŸ’¬ Discuss
βœ… Correct Answer: (C) history.go(-3);

Q. What will be the output of the following JavaScript code?

Code:
function myfun()
{
document.getElementById ("demo").innerHTML = Boolean(21 > 15);
}
  • (A) 0
  • (B) true
  • (C) false
  • (D) error
πŸ’¬ Discuss
βœ… Correct Answer: (B) true

Q. What will be the output of the following JavaScript code?

Code:
function myfun()
{
document.getElementById ("demo").innerHTML = Boolean(15.00 === 15);
}
  • (A) 0
  • (B) true
  • (C) false
  • (D) error
πŸ’¬ Discuss
βœ… Correct Answer: (C) false

Q. What will be the output of the following JavaScript code?

Code:
var b5 = Boolean('false');
document.getElementById ("demo").innerHTML =b5;
  • (A) true
  • (B) false
  • (C) error
  • (D) undefined
πŸ’¬ Discuss
βœ… Correct Answer: (A) true

Q. What will be the output of the following JavaScript code?

Code:
function myfun()
{
var a = "";
document.getElementById ("demo").innerHTML = Boolean(a);
}
  • (A) undefined
  • (B) false
  • (C) true
  • (D) error
πŸ’¬ Discuss
βœ… Correct Answer: (B) false

Q. What will be the output of the following JavaScript code?

Code:
function myfun()
{
var a = null;
document.getElementById ("demo").innerHTML = Boolean(a);
} }
  • (A) true
  • (B) false
  • (C) error
  • (D) undefined
πŸ’¬ Discuss
βœ… Correct Answer: (B) false

Q. 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)
πŸ’¬ Discuss
βœ… Correct Answer: (C) parent.parent

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

  • (A) They are all Window objects
  • (B) They are all Window contexts
  • (C) They are all browsing information
  • (D) They are all browsing contexts
πŸ’¬ Discuss
βœ… Correct Answer: (D) They are all browsing contexts

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

  • (A) Browser Information
  • (B) Browsing context
  • (C) Both Browser Information & Browsing context
  • (D) Browser Log
πŸ’¬ Discuss
βœ… Correct Answer: (B) Browsing context