Get values from object props

Benchmark created on


Setup

const obj = {a:1, b:2, c:3, d:4}

Test runner

Ready to run.

Testing in
TestOps/sec
Destructuring
const {a,b,c,d} = obj;
ready
Comma separated assignment
const a = obj.a, b = obj.b, c = obj.c, d = obj.d;
ready
Semicolon separated assignment
const a = obj.a;
const b = obj.b;
const c = obj.c;
const d = obj.d;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.