StefiIOE

2.1

Nov 25th, 2020
489
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function flatten(a) {
  2.  
  3.     return a.reduce(function (flat, toFlatten) {
  4.     return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);
  5.   }, []);
  6. }
  7.  
RAW Paste Data