Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • I would think concat needed shimming but no... :-) Commented Jan 4, 2013 at 17:41
  • Shim = compatibility layer. Very popular means of adding ES5 support (read: lots of functionality) to ES3 browsers (read: IE8) Commented Jan 4, 2013 at 17:45
  • @JanDvorak OK. Got It. But concat is one of those very old standard functions. I guess we don't have much in mind because it's rarely useful. Commented Jan 4, 2013 at 17:47
  • In the second version, you could also sacrifice a small amount of performance(?) for symmetry and write the first loop as for (var k in h1) h3[k]=(h3[k]||[]).concat(h1[k]); Commented Jan 4, 2013 at 17:49
  • I don't really remember what is "very old standard" and what is "shiny new that should have been very old standard" when it comes to cross-browser javascript. Commented Jan 4, 2013 at 17:49