From 75a5a1be0030530ae9690e1c30fc0482ba341fa5 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Wed, 19 Apr 2023 14:35:33 -0400 Subject: [PATCH] removing comments --- random.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/random.js b/random.js index 2cf2b7f..0fe7a8e 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}); @@ -49,13 +49,12 @@ const getLeaves = (node)=>{ } let twoPathResult = []; - const twoPathLeftValue = getLeaves(node.twoPath.left); //2 - const twoPathRightValue = getLeaves(node.twoPath.right); //[[2,3],[3,2]] + const twoPathLeftValue = getLeaves(node.twoPath.left); + const twoPathRightValue = getLeaves(node.twoPath.right); if(Number.isInteger(twoPathRightValue)){ twoPathResult[0] = twoPathLeftValue; twoPathResult[1] = twoPathRightValue; } else { - //[2] [[2,3],[3,2]] twoPathRightValue[0].unshift(twoPathLeftValue) twoPathRightValue[1].unshift(twoPathLeftValue); twoPathResult = twoPathRightValue;