Divami interview question

Javascript react programming problem solving, web