Array Related Coding Question In Javascript Object Methods