host and hostname js code example
Example 1: js origin without port
// origin without the port
`${window.location.protocol}//${window.location.hostname}`
Example 2: js host without port
// host without the port
window.location.hostname
// origin without the port
`${window.location.protocol}//${window.location.hostname}`
// host without the port
window.location.hostname