I think everything works now

master
Matthew Huntington 3 years ago
parent 6f9177bacf
commit a33ef49b2e

@ -39,7 +39,7 @@ const breakDown = (node)=>{
return node; return node;
} }
const tree = breakDown({value:9}); const tree = breakDown({value:10});
//console.dir(tree, {depth:null}); //console.dir(tree, {depth:null});
@ -76,8 +76,9 @@ const getLeaves = (node)=>{
if(Number.isInteger(threePathRightValue[0])){ if(Number.isInteger(threePathRightValue[0])){
threePathRightValue.unshift(threePathLeftValue); threePathRightValue.unshift(threePathLeftValue);
} else { } else {
threePathRightValue[0].unshift(threePathLeftValue) for(let subArray of threePathRightValue){
threePathRightValue[1].unshift(threePathLeftValue); subArray.unshift(threePathLeftValue);
}
} }
threePathResult = threePathRightValue; threePathResult = threePathRightValue;
} }

Loading…
Cancel
Save