JSFiddle - React, Tailwind, and code Playground
by wesley_murch
JavaScript
var url = "http://www.mysite.com/category/action";
var segments = url.split(/\//);
alert(segments.pop());
by wesley_murch
var url = "http://www.mysite.com/category/action";
var segments = url.split(/\//);
alert(segments.pop());