javascript - Concating two arrays results in nested array when one is constructed via map -


I am trying to include two arrays using concat-method.

However, if one of them is created using jQuery's "map" method, then I get nested orange:

  var first = [] ; Var Second = $ (""). Map (function (e, i) {return tap;}); ; Var Results = First. Cocktail (second); Warning (result.length); Warning (result [0]); The output of alerts is expected to be "[object object]" "1", respectively, expecting "0" and "undefined". 
Debugger shows the results "[[]]".

What's wrong here?
It gives the map array.

The method you are using is incorrectly used:

This returns a jQuery object.

Comments