JSFiddle - React, Tailwind, and code Playground

JavaScript

var url = '/Controller/Action?id=11112&value=4444';
alert(url.split('?')[0]);