JavaScript Questions & Answers – JavaScript with FireBug

This set of Javascript Multiple Choice Questions & Answers (MCQs) focuses on “JavaScript with FireBug”.

1. Firebug is an extension of which browser?
a) Mozilla
b) Chrome
c) IE
d) Opera
View Answer

Answer: a
Explanation: Firebug is a discontinued free and open-source web browser extension for Mozilla Firefox that facilitated the live debugging, editing, and monitoring of any website’s CSS, HTML, DOM, XHR, and JavaScript.

2. Firebug can be used to inspect ___________
a) HTML
b) CSS
c) DOM
d) All of the mentioned
View Answer

Answer: d
Explanation: Firebug is an extension for the Mozilla Firefox browser that allows you to debug and inspect HTML, CSS, the Document Object Model (DOM) and JavaScript. In addition to debugging web pages, Firebug was used for web security testing and web page performance analysis.

3. Why do Web Developers use Firebug?
a) Track cookies
b) Track sessions
c) Both Track cookies and sessions
d) Track data
View Answer

Answer: c
Explanation: Web developers use Firebug for the following reasons:

  • Inspect the behavior of HTML/CSS, and modify style & layout with true WYSIWYG
  • Debug JavaScript
  • Detect performance of website
  • Track Cookies & Sessions
  • Web security analysis
advertisement
advertisement

4. What are the goals for using Firebug?
a) Performance
b) Adaptability
c) Complexity
d) Reliability
View Answer

Answer: a
Explanation: The goals for using Firebug is:

  • Performance
  • Modularity
  • Shared code
  • Compatibility
  • Web security analysis

5. Which of the following is not a feature of the User Interface?
a) Skinnable Interface
b) Resizable Side Panel
c) Fixed Side Panel
d) Menu options
View Answer

Answer: c
Explanation: The features present in the User Interface are:

  • Port of Firebug’s Visual Object Representation (aka Reps)
  • Recreation of Firebug 1.3 User Interface with pixel precision
  • Menu options
  • Resizable Side Panel
  • Skinnable Interface

6. What is the default value of the property overrideConsole?
a) 1
b) true
c) 0
d) false
View Answer

Answer: b
Explanation: The default value of the property overrideConsole is true.

7. Which of the following property(s) has a default value as false?
a) disableWhenFirebugActive
b) showIconWhenHidden
c) disableXHRListener
d) both disableWhenFirebugActive & showIconWhenHidden
View Answer

Answer: c
Explanation: Only disableXHRListener property has a default value false. The properties disableWhenFirebugActive and showIconWhenHidden has a default value of true.
advertisement

8. Which of the following action is possible in Firebug when used as a JavaScript Debugger and Profiler?
a) Pause execution in any line
b) Find Scripts easily
c) Find Scripts easily & also Pause execution in any line
d) Find text easily
View Answer

Answer: c
Explanation: When Firebug is used as a JavaScript Debugger and Profiler, it can be used to find scripts easily and also pause the execution in any desired line. Thus it helps in debugging javascript much easier.

9. What will be the output or type of error if p is not defined in the following JavaScript code?

advertisement
console.log(p)

a) Zero
b) Null
c) ReferenceError
d) ValueNotFoundError
View Answer

Answer: c
Explanation: The above code snippet, p is not defined. Hence, it gives a ReferenceError.

10. The let keyword can be used ___________
a) in a for or for/in loop, as a substitute for var
b) as a block statement, to define new variables
c) to define variables that are scoped to a single expression
d) all of the mentioned
View Answer

Answer: d
Explanation: The let keyword can be used in four ways:

  1. as a variable declaration like var;
  2. in a for or for/in loop, as a substitute for var;
  3. as a block statement, to define new variables and explicitly delimit their scope; and
  4. to define variables that are scoped to a single expression.

Sanfoundry Global Education & Learning Series – Javascript Programming.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.