I have a function that returns 5 objects, and I would like to declare 4 of them using const and 1 of them using let. If I wanted all objects declar
const
let
It isn't possible to perform a destructure that initialises both let and const variables simultaneously. However the assignments to const can be reduced to another destructure:
const results = yield getResults() const { thing1, thing2, thing3, thing4 } = results let thing5 = results.thing5