Thanks, EkBass, but on re-checking W3Schools (arrays, functions) I still don't see what is wrong with my function. Just de-commenting "const numArray = [];" is enough to make the webpage fail, even if the function is never called.
I should have included the two other small functions called...