Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.js次のように、spidermonkey を使用してコンソールで実行するときに、ユーザー入力を取得する必要があります。
.js
$ js myprogram.js
Ruby に相当する JavaScript は何getsですか?
gets
コンソールがそこにあることに本当に依存することはできません。ほとんどのブラウザーには JavaScript コンソールがありますが、これは保証されるものではありません。それを超えて、コンソールで関数を呼び出さずに値を取得できるとは思いません。