The oldURL property is a read-only property and is used to return URL of the document before hash i.e, anchor part has been changed. It contains the URL to which we navigated from. For getting the URL from which we navigated, we use the newURL property.
Its syntax is:- event.oldURL
Its return is:- a string containing URL that was navigated from