How to store JavaScript functions in arrays?

To store JavaScript functions in arrays, we reference the function in an array.

For instance, we write

const yourFunction = () => {
  console.log("I am your function");
};

const group = [0, "abc", false, yourFunction];

group[3]();

to put yourFunction in the group array.

Then we call yourFunction with group[3]().