<!DOCTYPE html>
<html>
<body>
<h1>JavaScript location.pathname Property</h1>
<p id="demo"></p>
<script>
let pathName = location.pathname;
document.getElementById("demo").innerHTML = pathName;
</script>
</body>
</html>