Sobes.tech
Junior — Senior

Extracting functions from an array using destructuring

livecode

Task condition

It is necessary to demonstrate how to call functions that are inside an array returned from another function.

function obtain() {
  return [
    () => { console.log('Hello') },
    () => { console.log('Hello_2') }
  ];
}

Describe a way to access these functions (for example, through destructuring) and how to call them afterward.