javascript callback with browser dom

prototype is the function template when new is called so that it could be assign to the object’s __proto__. very good video explaining event loop/callback and browswer. Some summary: Typical type of event: User event, XHR event, Timer event. the whole picture is callstack+eventloop+web api. call stack is where the code runs eventloop is where…