Given an array of self-contained JavaScript functions is there a way to access their respective indexes from within the function code? I would like to avoid having to hard-code those indexes in the function code:
var testArr = [
(function(){return 0})(),
(function(){return 'how to return/access ARRAY INDEX (=1)??'})()
]
console.log(testArr[0]) // 0
console.log(testArr[1]) // how to return/access ARRAY INDEX (=1)??