ʕ ˙ɷ˙ ʔค

알고리즘/코딩테스트

[JS]프로그래머스 Lv.0 문자열 출력하기

YJ_P 2023. 9. 6. 17:17

 

답안 

const readline = require('readline');
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

let input = [];

rl.on('line', function (line) {
    input = [line];
}).on('close',function(){
    str = input[0];
    console.log(str)
});