Pregunta de entrevista de Mindfire Solutions

difference between document.ready and anonymous function in javascript

Respuestas de entrevistas

Anónimo

18 de nov de 2013

Anonymous function will be executed firs.

Anónimo

11 de ago de 2015

Self-invoking functions runs instantly i.e will be executed as soon as it is encountered in the Javascript. $(document).ready(function() {})(); will trigger only after dom elements are completely constructed.