Classes And Modules(Javascript ) Questions and Answers
Explanation:-
Answer: Option D. -> dojox.secureCaja is Google’s open-source secure subset. Caja (Spanish for “box”) defines two language subsets. Cajita (“little box”) is a narrow subset like that used by ADsafe and dojox.secure. Valija (“suitcase” or “baggage”) is a much broader language that is close to regular ECMAScript 5 strict mode (with the removal of eval()). Caja itself is the name of the compiler that transforms (or “cajoles”) web content (HTML, CSS, and JavaScript code) into secure modules that can be safely hosted on a web page without being able to affect the page as a whole or other modules on the page.
Explanation:-
Answer: Option A. -> This will flash an errorThe above code snippet will flash an error. Attempts to alter the value or re-declaration causes errors.
Explanation:-
Answer: Option A. -> in a for or for/in loop, as a substitute for varThe 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.
Explanation:-
Answer: Option D. -> ADSafeADsafe was one of the first security subsets proposed) It was created by Douglas Crockford (who also defined The Good Parts subset).ADsafe relies on static verification only, and it uses JSLint as its verifier. It forbids access to most global variables and defines an ADSAFE variable that provides access to a secure API, including special-purpose DOM methods. ADsafe is not in wide use, but it was an influential proof-of-concept that influenced other secure subsets.