Koodoo interview question

Technical test solving an account issue in javascript