Q.1
What is the opposite approach to the lexical scoping?
Q.2
What is the purpose of the dynamic scoping?
Q.3
Which of the algorithmic languages is lexical scoping standardized in?
Q.4
What is a closure?
Q.5
Which of the following are examples of closures?
Q.6
Which of the following uses a lot of CPU cycles?
Q.7
Consider the following code snippet :
var scope = "global scope";
function checkscope() {
var scope = "local scope"; 
function f() 
{ 
     return scope; 
}
return f;
What is the function of the above code snippet?
Q.8
What is the fundamental rule of lexical scoping?
Q.9
What is the difference between the two lines given below ?
!!(obj1 && obj2);
(obj1 && obj2);
Q.10
Consider the following code snippet :
var c = counter(), d = counter(); 
c.count()
d.count() 
c.reset() 
c.count() 
d.count()
The state stored in d is :
Q.11
Consider the following code snippet :
var a = [1,2,3,4,5];
a.slice(0,3);
What is the possible output for the above code snippet ?
Q.12
Which of the following is the correct code for invoking a function without this keyword at all, and also too determine whether the strict mode is in effect?
Q.13
Consider the following code snippet :
var c = counter(), d = counter(); 
function constfuncs() 
{
    var funcs = [];
    for(var i = 0; i < 10; i++)
        funcs[i] = function() { return i; };
    return funcs;
}
var funcs = constfuncs();
funcs[5]()
What does the last statement return ?
Q.14
What kind of scoping does JavaScript use?
Q.15
What must be done in order to implement Lexical Scoping?
Q.16
Do functions in JavaScript necessarily return a value ?
Q.17
Consider the following code snippet :
var tensquared = (function(x) {return x*x;}(10));
Will the above code work ?
Q.18
Consider the following code snippet :
var string2Num=parseInt("123xyz");
The result for the above code snippet would be :
Q.19
If you have a function f and an object o, you can define a method named m of o with
Q.20
For the below mentioned code snippet:
var o = new Object();
The equivalent statement is:
0 h : 0 m : 1 s