Home

What is Dom? what is the purpose of Dom?

DOM stand for document object model. In the web browser sometimes we need to do some changes such as document structure, style, and content. we can easily do that by using dom. Dom most important for web programming. we can select elements form HTML document and make them change however we want. It makes a web application more interactive.

How to select from DOM?

In javaScript there are so many ways to select from dom. there are getElementsByTagName, getElementById, getElementsByClassName, querySelector, querySelectorAll etc.

What is event bubble?

we know every HTML document stricture like reverse tree. when we select elements and do something it render to to bottom like bubble form inside the water. it will go top to bottom an where ever match the event it will execute. there are some ways we can stop bubbling. there is stopPropagation() it can stop bubbling. by using stopImmediatePropagation() we can immediately.

What is callback function and where it used?

A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.