20230913 a와 b 출력하기

이셀·2023년 9월 18일
0

a와 b 출력하기

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

let input = [];

rl.on('line', function (line) {
    input = line.split(' ');
}).on('close', function () {
    console.log(`a = ${Number(input[0])}\nb = ${Number(input[1])}`);
});

이 문제는 console.log안의 내용을 바꾸는 문제였는데 a = ${Number(input[0])}\nb = ${Number(input[1])} 였다

전혀 감이 안와 서치로 해결한 아쉬운 문제다ㅜㅜ

profile
프론트엔드 개발 과정을 기록 중입니다:)

0개의 댓글