Sahar E.Hassan

javascript history object

History object:

  • Is a javascript object, contains all visited URLs in specific browser tab.
  • It’s part of window object and can be accessible throw window.history property.
console.log(window.history);

--

--

window object

Window object:

It’s the global object that represents the open window in the browser.

  • All predefined methods like: alert(“hello”) are attached to the global window object.
alert("hello");     ===     window.alert("hello");
  • All new global variables and methods are also attached to the global window object.
var name = "John";
console.log(name); //John
console.log(window.name); //John
  • BOM…

--

--