if we alert something in both function then which will execute first ?Ans:Ready
jQuery's document.ready() event will be fire when the DOM is loaded, it's not wait for resources
We can write multiple document.ready() in a page but Body.Onload() event cannot.
The onload() event will be fire after the DOM and related content of the page got loaded like All Images,scripts etc
The undefined means a variable has been declared but has no value.
var nameTest; console.log(nameTest); //undefined console.log(typeof nameTest); //undefined
null is an assignment value,Variable declared and is an empty value
var nameTest=null; console.log(nameTest); //null console.log(typeof nameTest); //object