Array Related Coding Question In Javascript Object Values