diff --git a/eloquentjavascript/05_higher_order_functions/composability.js b/eloquentjavascript/05_higher_order_functions/composability.js new file mode 100644 index 0000000..e69de29 diff --git a/eloquentjavascript/05_higher_order_functions/exercises.js b/eloquentjavascript/05_higher_order_functions/exercises.js new file mode 100644 index 0000000..ba4b234 --- /dev/null +++ b/eloquentjavascript/05_higher_order_functions/exercises.js @@ -0,0 +1,17 @@ +let arrays = [[1,2,3], [4,5],[6,7]]; +let newArray = []; +let newArray2 = arrays.flat(); + +for (let key in arrays) newArray = newArray.concat(arrays[key]); +// arrays.forEach((v) => { +// newArray.push(v); +// newArray.concat(v); +// }) +// function reduceArrays(){ +// for (array of arrays) { +// console.log(array,count) + +// } +// } +//reduceArrays(); +console.log(newArray2);