Report question

Question: How to extract base URL from a string in JavaScript?