Javascript Function to Update the Query String Value of a URL String
We want to be able to call a javascript function to replace a value with a query string Key. The examples: updateURL("https://www.example.com/?name=name&age=25", "name", "hello") 'https://www.example.com/?name=hello&age=25' updateURL("https://www.example.com/?name=name&age=25", "age", 12) 'https://www.example.com/?name=name&age=12' …