Flatten a multidimensional array (Helper)

1
2
Array.prototype.flatten = function() {
var flattened = [];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Helper function to flatten all sub-arrays inside an array ─ This snippet is a piece of a JavaScript library I'm working on, you can see it here: https://github.com/luishendrix92/WindowbirdJS

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.