fork download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4.  
  5. var x;
  6. x = 'А вот хуй!';
  7. function f() {
  8. console.log(x); // => Undefined
  9. x = 'А теперь вызываем внутренню переменную!'
  10. console.log(x);
  11. var x;
  12. }
  13. f();
  14.  
  15. process.stdin.on('data', function (chunk) {
  16. var data = '';
  17. data+=chunk;
  18. f();
  19. });
Success #stdin #stdout 0.06s 11184KB
stdin
Standard input is empty
stdout
undefined
А теперь вызываем внутренню переменную!