const twoStrMap = { 'reset board': 'board fault', 'board add': 'where to add', 'board delete': 'no board at all', 'reboot backplane': 'impossible', 'backplane abort': 'install first' } const errMsg = 'unknown command' let line = '' while(line = readline()) { if(line.indexOf(" ") === -1) ...