Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Khuzha/a4c1422a4f998c9c8e89752fb077da01 to your computer and use it in GitHub Desktop.
Save Khuzha/a4c1422a4f998c9c8e89752fb077da01 to your computer and use it in GitHub Desktop.
Из общения в чате https://t.me/js_ru для объяснения своего вопроса...
var a = prompt('вводите', 'упс:(');
console.log(a);
@Khuzha
Copy link
Author

Khuzha commented Aug 19, 2018

ошибка:

/home/oneuser/MyProjects/js/19.08/1index.js:1
(function (exports, require, module, __filename, __dirname) { var a = prompt('вводите', 'упс:(');
^

ReferenceError:
prompt is not defined
at Object. (/home/oneuser/MyProjects/js/19.08/1index.js:1:71)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

@Khuzha
Copy link
Author

Khuzha commented Aug 19, 2018

Попробовал этот Ваш код:

const result = prompt('wtf?', 'Шо ты пыришься?');
alert(result);

Снова таже ошибка:

/home/oneuser/MyProjects/js/19.08/1index.js:1
(function (exports, require, module, __filename, __dirname) { const result = prompt('wtf?', 'Шо ты пыришься?');
^

ReferenceError:
prompt is not defined
at Object. (/home/oneuser/MyProjects/js/19.08/1index.js:1:78)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment