Infosys interview question

Questions were mainly based out of javaScript Asked some questions on useEffect