Post History
JavaScript (Node.js), 51 bytes n=[];f=(a)=>a&&a.map?(n.push(a.length),f(a[0]),n):n Run f on your input, e.g. f([[],[]]). Explanation: n=[]; // make a global array to hold the res...
Answer
#1: Initial revision
## JavaScript (Node.js), 51 bytes ``` n=[];f=(a)=>a&&a.map?(n.push(a.length),f(a[0]),n):n ``` Run f on your input, e.g. `f([[],[]])`. --- Explanation: ``` n=[]; // make a global array to hold the results f=(a)=> // make the function a&&a.map? // is a defined, and an array? (n.push(a.length), // add the length to the results f(a[0]), // do it again on the first item n) // ...and return n // ...if not, return n :n ```