a function returns an array of [result, error]
Right now I am instantiating the constant as the array:
const [result, error] = function
How do I instantiate only the result element like this:
const result = function
You can probably extract it directly from your function const result = function().result
const result = function().result
If you're only interested in the first element returned by the function, it can simply be
const [result] = function();