
🔴 문제
단어 길이 재기
🟡 Sol
const fs = require('fs');
const path = process.platform === 'linux' ? '/dev/stdin' : 'Wiki\\input.txt';
const inputs = fs.readFileSync(path).toString().trim();
console.log(inputs.length)
🟢 풀이
⏰ 소요한 시간 : -
JS의 문자열 객체의 속성인 length를 사용해서 입력받은 문자열의 길이를 출력해준다.
🔵 Ref