A URL with protocol is a URL that matches the regular expression
^[a-zA-Z]+://. The following are examples of URLs with protocol:
The following aren't:
//example.com/path/to/index.js. This one is a bit tricky. Web browsers would consider this as a protocol-relative URL, which technically implies a protocol, although that protocol would be different depending how you are viewing the file, e.g. locally through
file://vs on a with website
https://.For simplicity's sake, we just consider it as a URL without protocol.