ExamVeda
Login
Home
11
In how many modes can the closure compiler be run?
Discuss
Answer & Solution
Answer: Option B
Solution:
There are totally 2 modes in which the closure compiler can be run namely :
1. Simple mode
2. dvanced mode
12
What is the purpose of the simple mode?
Discuss
Answer & Solution
Answer: Option A
Solution:
In Simple mode it mostly performs like most other minifiers, removing whitespace, line breaks, and comments.
13
What is a closure compiler UI?
Discuss
Answer & Solution
Answer: Option B
Solution:
A closure compiler UI is a web application.
14
What are the benefits of closure compiler?
Discuss
Answer & Solution
Answer: Option D
Solution:
The closure compiler is highly beneficial in terms of :

1. Efficiency: The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs.

2. Code checking: The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and easier to maintain.
15
In what way is the closure compiler efficient?
Discuss
Answer & Solution
Answer: Option B
Solution:
The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs.
16
In which way can the closure compiler can be used?
Discuss
Answer & Solution
Answer: Option D
Solution:
You can use the Closure Compiler as:
1. An open source Java application that you can run from the command line.
2. A simple web application.
3. A RESTful API.
17
What is the purpose of the advanced mode in the closure compiler?
Discuss
Answer & Solution
Answer: Option C
Solution:
In Advanced mode it rewrites the JavaScript by renaming variables and functions from longer descriptive names to single letters to save file size, and it inlines functions, coalescing them into single functions wherever it determines that it can.
18
Why is a closure template used?
Discuss
Answer & Solution
Answer: Option C
Solution:
Closure Templates are a templating system for dynamically generating HTML in both Java and JavaScript. Because the language was apparently referred to as “Soy” internal to Google, and “Soy” remains in some of the documentation and classes, sometimes Closure Templates are referred to as “Soy Templates”.
19
In what way does the closure compiler help in checking the code?
Discuss
Answer & Solution
Answer: Option A
Solution:
The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and easier to maintain.
20
What is the function of the closure compiler?
Discuss
Answer & Solution
Answer: Option C
Solution:
The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what’s left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.