Find Last Index Array Javascript Push