fork download
  1. var x = 21;
  2. var test = function () { //here u should put parameter "x"
  3. console.log(x); // The output from calling method
  4. var x = 20; //last "x"
  5. //if u want to get the value of last "x" should call
  6. console.log(x); // the value of of last "x"
  7. };
  8. test(x); //here u should put parameter "x"
Success #stdin #stdout 0.02s 16688KB
stdin
Standard input is empty
stdout
undefined
20