Comparing performance of: toFixed(4) vs toPrecision(4).toString() vs (Math.round(*10000)/10000).toString() vs Math.floor fast vs the new Math.trunc
Banana
create new object when using Object.assign.
test
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