Question 1
var obj = function() {
var a = 0;
this.b = 0;
}
Inside the function, you can access both variables, but in the case of
var x = new obj();
... you can access x.b, but not x.a.
Question 2
Since your question is currently written, this is a syntax error. The following will work:
var x = 'a';
var f1 = function(x){ alert(x) }
var f2 = new Function('alert('+x+')')
... but it will be the same as the entry:
var x = 'a';
var f1 = function(x){ alert(x) }
var f2 = new Function('alert(a)')
. f1 x , , f2 x a. , , .
, , , :
var x = 'a';
var f1 = function(){ alert(x) }
var f2 = new Function('alert(x)')
... :
var f1 = function(x){ alert(x) }
var f2 = new Function('x', 'alert(x)')
, x, . f1 f2, , .
. , - f2, , , . , .