Merging arrays is a fairly common occurrence. I remember when I worked a lot with PHP I would use
array_merge() all the time. I found myself merging arrays often when handling form submission.
concat may mess up a reference. If you want to merge a second array into an existing first array, you can use this trick:
var array1 = [1, 2, 3];
var array2 = [4, 5, 6];
console.log(array1); // is: [1, 2, 3, 4, 5, 6]
push in this case, allows you to merge the second array into the first. The alternative is iterating through the second array and using
push on the first array. This shortcut is niiiiiiiiiice!
Kids these days, I tell ya. All they care about is the technology. The video games. The bottled water. Oh, and the texting, always the texting. Back in my day, all we had was...OK, I had all of these things too. But I still don't get...
My trip to Mozilla Summit 2013 was incredible. I've spent so much time focusing on my project that I had lost sight of all of the great work Mozillians were putting out. MozSummit provided the perfect reminder of how brilliant my colleagues are and how much...
Flexbox was supposed to be the pot of gold at the long, long rainbow of insufficient CSS layout techniques. And the only disappointment I've experienced with flexbox is that browser vendors took so long to implement it. I can't also claim to have pushed flexbox's limits, but...
The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. In Apple's...