I am trying to assign and destructure at the same time
a = {x: 1, y: 5}
let b, {x} = a
result:
b = undefined
x = 1
I want:
b = {x: 1, y: 5}
x = 1
Is there any way to achieve that ? When I try to assign with const
const c, {y} = a
^
Uncaught SyntaxError: Missing initializer in const declaration