[javascript] Array vs. Object efficiency in JavaScript