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
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
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
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
4. What are the goals for using Firebug?
a) Performance
b) Adaptability
c) Complexity
d) Reliability
View Answer
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
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
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
Explanation: Only disableXHRListener property has a default value false. The properties disableWhenFirebugActive and showIconWhenHidden has a default value of true.
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
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?
console.log(p)
a) Zero
b) Null
c) ReferenceError
d) ValueNotFoundError
View Answer
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
Explanation: The let keyword can be used in four ways:
- as a variable declaration like var;
- in a for or for/in loop, as a substitute for var;
- as a block statement, to define new variables and explicitly delimit their scope; and
- to define variables that are scoped to a single expression.
Sanfoundry Global Education & Learning Series – Javascript Programming.
- Check JavaScript Books
- Practice MCA MCQs
- Check Programming Books
- Apply for Computer Science Internship
- Practice Programming MCQs