I would rather return an object here. Ideally, we would just return two values like in go, but JavaScript doesn't let us do that in any clean way. The array subscripts in the calling code make me assume it's an actual array, which it isn't really (more like a tuple).