a frontend interview challenge