Option structure in JavaScript