So I began to mess around with JavaScript today, and I came across a funny case where it seems convinced that something is a function while also convinced that it's not a function. This code illustrates the issue:\[code\]var arr1 = Array(1)for (i = 0; i < arr1.length; i++) { arr1 = function(n) { return n + i }}var arr2 = Array(1)for (j = 0; j < arr2.length; j++) { arr2[j] = function(n) { return arr1[j](n) }}typeof arr2[0] // "function"arr2[0](2) // TypeError: Property '1' of object [object Array] is not a function\[/code\]From here, you can assign a variable to \[code\]arr2[0]\[/code\], and the error persists. I'm not sure if the closures or arrays are necessary to replicate this.Is there something off with my code, or is this just one of those JavaScript oddities? This isn't something I particularly need an answer to, but it's a little silly so I'd like to know if there's a reason for it.