JavaScript Window location.origin
JavaScript Window location.origin
The location.origin property is used to return the protocol, hostname, and port number of a URL and it is a read-only property.
Syntax:-
Its syntax is:- location.origin
Return:-
Its return is:- string containing protocol, hostname, and port number