Am just getting the ropes of JS Fundamentals, bear with me.
Following is the code :
function FuncWithMathOps(x){
var x=x;
console.log("Value of x : "+x);
var SUM = function(x){
var x=x;
console.log("Value of x : "+x);
console.log("Value of this.x : "+this.x);
}
var MUL = function(x){
var x=x;
console.log("Value of x : "+x);
console.log("Value of this.x : "+this.x);
}
return {
SUM:SUM,
MUL:MUL
};
}
Both external function and inner functions variable names are same i.e., x & y. How do i access external function FuncWithMathOps variables from inner functions SUM & MUL ?