Comparing whether checking is (typeof variable === "undefined") is faster than (variable === undefined)
const shuffleColor = (array) => { const length = array === null ? 0 : array.length; return length ? array[Math.floor(Math.random() * length)] : undefined; };
Testing the difference between native loops and find() with setting multiple variables
Measure the fastest way to merge objects, without mutation.
New benchmark Your benchmarks
Source code: GitHub/MeasureThat.net
Report issues: MeasureThat.net/Issues
Based on: Benchmark.js (v2.1.1)
Facebook page: https://www.facebook.com/MeasureThat.Net