Have you seen this question before?
I never knew the slice method takes negative integers!
Have you ever do console.log an object and wondering how can copy the object over?
How to use top-level await in ES Modules without all of the crazy hack
Repost my killer answer on StackOverflow with more than 600 votes
In short, a closure is not the function that is returned in another function. A closure is a combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function
Not all the time we need to cast from JSON object to a class, but sometimes it is really helpful. Use class-transformer to transform JSON object to class instance
Freeze screen in Chrome debugger / DevTools panel for inspect element that will disappear on hover/click
Run the setTimeout to trigger debugger before the element disappearing 🤓
Using momentjs parseZone functionality for that purpose
Just read an interesting problem this morning. It seems not to be difficult
There are only two hard things in Computer Science: cache invalidation and naming things
ES2015/ES6 has been around for more than two years with all the exciting feature and syntax. After working with TypeScript and Angular 2 in a project for more than a year, there are the features that I often apply in my code.