check if http or https javascript code example
Example: check if url is http or https javascript
You can make use of `window` keyword
=> window.location.protocol
You can make use of `window` keyword
=> window.location.protocol