목록2024/07/05 (1)
성빈

readline.question()const readline = require('readline'); // Node.js 내장 모듈인 readline을 불러온다.const r1 = readline.createInterface({ // 인터페이스 생성 input : process.stdin, // 표준 입력 output : process.stdout // 표줄 출력});r1.question("이름 : ", (answer) => { console.log(`사용자 이름 : ${answer}`); // 사용자가 입력을 완료했을 떄 호출되는 콜백함수 r1.close(); // readline 인터페이스를 닫는다.}) readline.question(query, callback) • question 함수는..
JavaScript
2024. 7. 5. 19:46