Implementing Multiple Value Returns in JavaScript