Some In Array Javascript Is Not A Function Error