Skip to main content

Timeline for Flatten an array

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Jul 6, 2016 at 5:53 vote accept CodeYogi
S Jul 6, 2016 at 5:53 history bounty ended CodeYogi
S Jul 6, 2016 at 5:53 history notice removed CodeYogi
Jul 1, 2016 at 11:39 answer added Peter Taylor timeline score: 5
Jun 29, 2016 at 13:45 history tweeted twitter.com/StackCodeReview/status/748150305745997824
Jun 29, 2016 at 8:53 comment added Pieter Witvoet Perhaps it's useful to take cycles into account: var a = []; a.push(a); flatten(a);, or at least to document that they're not supported?
Jun 29, 2016 at 8:36 answer added BeetleJuice timeline score: 5
S Jun 29, 2016 at 5:25 history bounty started CodeYogi
S Jun 29, 2016 at 5:25 history notice added CodeYogi Draw attention
Jun 28, 2016 at 0:49 comment added webdeb of course, you are right, if you are targeting only modern browsers it should be fine
Jun 27, 2016 at 23:25 answer added Joseph timeline score: 7
Jun 27, 2016 at 23:22 comment added Joseph @webdeb All modern browsers support ES5. Array.isArray and array.reduce are both supported.
Jun 26, 2016 at 16:31 comment added webdeb The function itself looks good, one hint, Array.isArray is not supported in every browser developer.mozilla.org/de/docs/Web/JavaScript/Reference/… some other array functions too.. so you should use a polyfill if it should be compatible to across older browsers, or use something like lodash ;)
Jun 26, 2016 at 14:46 history edited CodeYogi CC BY-SA 3.0
added 67 characters in body; edited title
Jun 26, 2016 at 14:28 history asked CodeYogi CC BY-SA 3.0