Complete JavaScript's array