“.KeyInselect” Kode Jawaban

.KeyInselect

console.log('you chose ' + index);
Hurt Hedgehog

.KeyInselect

const readLineSync = require('readline-sync'),
  items = ['option 1', 'option 2', 'option 3'],
  index = readLineSync.keyInSelect(items);
console.log('you chose ' + items[index]);
Hurt Hedgehog

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya