Skip to content

Commit 86ab0e4

Browse files
committed
code refactoring
1 parent 48108dd commit 86ab0e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chapter03/05-TowerOfHanoi.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ function towerOfHanoi(n, from, to, helper){
44
towerOfHanoi(n-1, from, helper, to);
55
to.push(from.pop());
66
console.log('-----')
7-
console.log('Source: ' + from.items.toString());
8-
console.log('Dest: ' + to.items.toString());
9-
console.log('Helper: ' + helper.items.toString());
7+
console.log('Source: ' + from.toString());
8+
console.log('Dest: ' + to.toString());
9+
console.log('Helper: ' + helper.toString());
1010
towerOfHanoi(n-1, helper, to, from);
1111
}
1212
}

0 commit comments

Comments
 (0)