摘要:
const generateTimeMs = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min /** * A generator which can generate numbers based on settings 阅读全文
摘要:
In Go, function can return multi value: func addAndSubstract(a int, b int) (int, int) { return a+b, a-b } It is also possible to define named return v 阅读全文
摘要:
What is holey array: an array with hole(s) const array = [1,2, ,3] Why this is a problem? Should array[2] to be undefined? Yes and no.. normally it is 阅读全文
摘要:
double equals is 15 times slower than triple equals. Underhood double equals need to call valueOf()function to convert the value. ({valueOf: () => 3}) 阅读全文
摘要:
https://www.npmjs.com/package/ses Lockdown The lockdown() function also tames some objects including regular expressions, locale methods, and errors. 阅读全文
摘要:
When you create a object, in V8, it creates a hidden class to repesent the object shape. Two different objects with same object shape might share the 阅读全文
摘要:
Concurrency + Channel (CSP): Concurrency is a way to run operation in isolated thread, a way to better utilize the CPU resources and handle multi simu 阅读全文