ClassDojo interview question

Very common coding assessment scenario