smallcase interview question

Basic JS , React stuff