PHONE INTERVIEW: Given a javascript array like [ 'a', 1, null, [ ], 2, [ 'b', 'c', [ 'd' , [[ ], [1,32, 'ksdjb']], [ ]] ] ]; write a function to flatten it so it looks like [ 'a', 1, null, 2, 'b', 'c','d'......];
Anonymous
var combinedArray = []; function flatten(array) { for(var i=0; i
Check out your Company Bowl for anonymous work chats.