In this post I will share 12 extremely useful hacks for JavaScript. These hacks reduce the code and will help you to run optimized code. So let’s start hacking! 1) Converting to boolean using !! operator Sometimes we need to check if some variable ex…
转自:http://cek.io/blog/2015/12/03/event-loop/ What is JavaScript What is JavaScript anyway? Some words: It's a single-threaded, non-blocking, asynchronous, concurrent language" It has a call stack, an event loop, a callback queue, some other apis and…