JSFiddle - React, Tailwind, and code Playground

JavaScript

var str= "http://localhost:8080/Blah.ff?param=1&param=2";
var str2 = str.substr(str.indexOf("?"), str.length-3);
alert(str2)