MCQs
The variable properties are usually variables that are used internally in the objects methods, but can also be globally visible variables that are used through the page.
The Good Parts is a language subset designed for aesthetic reasons and with a desire to improve programmer productivity. There is a larger class of subsets that have been designed for the purpose of safely running untrusted JavaScript in a secure container or "sandbox.
Instances of B inherit all the instance methods of A. The class B can define its own instance methods, some of which may override methods of the same name defined by class A.
The basic difference between JavaScript and Java is that the functions are values, and there is no hard distinction between methods and fields.
In the above code snippet, p is not defined. Hence, it gives a ReferenceError.
eval() and the Function() constructor are not allowed in any secure subset because they allow the execution of arbitrary strings of code, and these strings cannot be statically analyzed.
If a catch clause has no conditional, it behaves as if it has the conditional if true, and it is always triggered if no clause before it was triggered.
The subexpression /java(script)?/ matches "java followed by the optional "script.
The sets object is the namespace for the module, and we define each of the set classes as a property of this object.
The given pattern is applied on the text given in the paranthesis.