Written by Robin Cornett. Last updated on June 12, 2024. Fix: Function incorrectly returning array instead of object.