The top property is used to return the top most window in the current browser window. It is not similar to parent property and it will return the top most window in the window hierarchy while window.parent will return the immediate parent of the current window. It is a read-only property.
Its syntax is:- window.top
Its return is:- top most window in the hierarchy of windows