iterate over all cubes
for ( let i = 0 ; i < totalCubes ; i ++ ) { let currCube = preProcessedCubes [ i ] ; let digitsInCube = currCube . length ; let index = 0 ; let digitsInNumber = num . length ; for ( let j = 0 ; j < digitsInNumber ; j ++ ) {