From f6fc7364da6e892de5730f174700a744e08c6a7a Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Wed, 19 Apr 2023 13:08:33 -0400 Subject: [PATCH] oops --- random.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/random.js b/random.js index 57461dc..3d11243 100644 --- a/random.js +++ b/random.js @@ -39,7 +39,7 @@ const breakDown = (node)=>{ return node; } -const tree = breakDown({value:5}); +const tree = breakDown({value:7}); console.dir(tree, {depth:null}); @@ -51,8 +51,8 @@ const getLeaves = (node)=>{ const twoRightValue = getLeaves(node.twoPath.right); if(node.threePath !== undefined){ - const threeLeftValue = getLeaves(node.twoPath.left); - const threeRightValue = getLeaves(node.twoPath.right); + const threeLeftValue = getLeaves(node.threePath.left); + const threeRightValue = getLeaves(node.threePath.right); return [[twoLeftValue, twoRightValue], [threeLeftValue, threeRightValue]]; } @@ -60,4 +60,4 @@ const getLeaves = (node)=>{ } const leaves = getLeaves(tree); -console.log(leaves); +console.dir(leaves, {depth:null});