From 2a375ebcbb455ef6514a1bbc1350806204da9b13 Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 13 Dec 2022 21:38:18 +0800 Subject: [PATCH] Fix the PrintUtil.js showTrunks --- codes/javascript/include/PrintUtil.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/javascript/include/PrintUtil.js b/codes/javascript/include/PrintUtil.js index daeb24a7d..3590f333b 100644 --- a/codes/javascript/include/PrintUtil.js +++ b/codes/javascript/include/PrintUtil.js @@ -79,10 +79,10 @@ function showTrunks(p) { } showTrunks(p.prev); - console.log(p.str); + process.stdout.write(p.str); } -module.exports = { +module.exports = { printTree, printLinkedList, }