Skip to content

Commit 303b96f

Browse files
committed
fixing presenting problems
1 parent 604ccb5 commit 303b96f

File tree

1 file changed

+2
-2
lines changed
  • implement-shell-tools/wc

1 file changed

+2
-2
lines changed

implement-shell-tools/wc/wc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ async function wcJsImplement() {
2626
}
2727
}
2828
totalWords += wordsCount;
29-
console.log(`${linesCount} ${wordsCount} ${bytes} ${file}`);
29+
console.log(`${String(linesCount).padStart(4)}${String(wordsCount).padStart(4)}${String(bytes).padStart(4)} ${file}`);
3030

3131
}
32-
console.log(`${totalLines} ${totalWords} ${TotalBytes} total`);
32+
console.log(`${String(totalLines).padStart(4)}${String(totalWords).padStart(4)}${String(TotalBytes).padStart(4)} total`);
3333
}
3434
wcJsImplement();

0 commit comments

Comments
 (0)