js input current url into string code example Example: javascript get url path window.location.pathname