How to get the last segment of a URL in JavaScript | Atomized Objects

How to get the last segment of a URL in JavaScript | Atomized Objects