UNPKG

@ahsolo/lotide

Version:

lotide assignment for Lighthouse Labs coding bootcamp

15 lines (13 loc) 282 B
const flatRecursion = function (input, output) { if (Array.isArray(input)) { for (let ele of input) { flatRecursion(ele, output); console.log(ele); } } else { console.log("Input", input); output.push(input); } } module.exports = flatRecursion;