JSFiddle - React, Tailwind, and code Playground

by Annemarie Köhler

JavaScript

var arr = [
	[
  	[1]
   ],
   [
   	[2],
    [2],
    [3],
    [4]
   ],
   [
   	[4],
    [6]
   ]
 ]
 
// console.log(arr.length);
 
 
 var flattened = arr.reduce(function(a, b) {
  return a.concat(b);
}, []);

console.log(flattened.length)