Pregunta de entrevista de Tata Consultancy Services

How useEffect working with dependency array and without dependency array