Riddle&Code interview question

Questions about react, typescript/javascript and others