Not sure why my array is not allowed to use a function (OOP)

It’s easier to hit ctrl-t to get auto indents.

Then you see strange looking

}
}

right away


in your old code :