When adding an element to an array, measure the performance of push, spread syntax and concat. The case is when original array must contain the new element, thus modifying it in process.
Comparing performance of: Concat vs Push vs Spread syntax
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory