1.

In how many modes can the Closure compiler be run?(a) 2(b) 3(c) 4(d) 5The question was posed to me by my college director while I was bunking the class.Query is from Performance Measures in JavaScript in chapter Performance Measures in JavaScript of JavaScript

Answer»

Right answer is (a) 2

Explanation: Closure COMPILER can be run in EITHER of two modes:

 In Simple mode it mostly performs like most other minifiers, removing whitespace, line breaks, and comments

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



Discussion

No Comment Found

Related InterviewSolutions