Indexof Array Javascript Object Methods