发布了文章2018-09-14
Opening a new tab/window, either by hyperlinks (i.e <a> tag with target attribute set to _blank) or programmatically calling window.open, will grant the newly-opened tab/window access back to the originating tab/window via window.opener. The...
发布了文章2018-05-01
clientWidth: gives you the size of the space inside the element, ignoring border width.
发布了文章2018-03-27
ES6 introcues a new type called symbol. The Symbol function returns a value of type symbol.
发布了文章2018-03-25
Recursion, simply put, is calling a function on itself. It can used to break down complex problems into smaller manageable similar units that can be handled by the same function.
发布了文章2018-03-16
If the seperator is a regular expression that contains capturing groups, the capturing groups will appear in the result as well.
发布了文章2018-03-14
Functions are first-class citizen in JavaScript, as the same as other types(e.g. number, array, object). They can be used as arguments, as well as return value from other function.
发布了文章2018-03-13
JavaScript has a concurrency model based on event loop. Each message is processed completely before any other message is processed. This offers some nice properties when reasoning about your program, including the fact that whenever a function run...
发布了文章2018-03-12
I complete reading JavaScript Enlightenment recently. The book is more about basics in JavaScript and suitable for beginners. Here are a list of my benefits and extensions from the book.
发布了文章2018-03-11
When we want to insert a script into a web page, the standard way is to use the script tag(i.e. <script>). The first impression that comes to people's mind about script tag is - BLOCKING . The book High Performance Web Sites Rule 6 suggests ...
发布了文章2018-03-09
Recently I have been reading the book Async Javascript about JS asynchronicity and JS event is one of the useful solutions to the problem. To get a deeper understanding of how events work, I create a custom EventEmitter which constains most of the...