Unique Array Values
var j = [...new Set([1, 2, 3, 3])]
>> [1, 2, 3]
Getting unique array values is another awesome usage of the spread operator. And don't forget you can merge object properties with the spread operator!
There's no better feeling than being able to remove a library to complete a task that should be native to the language. This trick brings us one step closer to that!
One event that's always been lacking within the document is a signal for when the user is looking at a given tab, or another tab. When does the user switch off our site to look at something else? When do they come back?
I work with an awesome cast of developers at Mozilla, and one of them in Daniel Buchner. Daniel's shared with me an awesome strategy for detecting when nodes have been injected into a parent node without using the deprecated DOM Events API.
Usability is a key feature when creating user interfaces; it's all in the details. I was recently using my iPhone and it dawned on my how awesome the "x" icon is in its input elements. No holding the delete key down. No pressing it a...
I recently came upon an interesting jQuery article about how you can retrieve all external links within a page, build the address of the site's favorite icon, and place the favorite icon along side the link. I've chosen a different approach which...