Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

const readline = require('readline') const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) // 今のフェーズを管理する const PHASE = { NORMAL: 0, WILL_QUIT: 1 // quitするか聞いてる時 } let phase = PHASE.NORMAL console.log('Please enter some text:') rl.prompt() rl.on('line', input => { switch (phase) { case PHASE.NORMAL: if (input === 'quit') { console.log('Really?') rl.prompt() phase =
const EventEmitter = require('events') // 司会者 class Presenter extends EventEmitter { constructor (personName, quizes) { super() this._personName = personName this._quizes = quizes console.log(`司会を務めさせて頂きます、"${personName}"です。`) } get personName () { return this._personName } // 発言 _say (text) { console.log(`${this.personName}「${text}」`) } } // クイズ解答者 class Player { constructor (entryName, thinkMs)
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く