JSFiddle - React, Tailwind, and code Playground

by mariomc

JavaScript

const url = new URL('http://example.com/path/index.html?param=value');
url.pathname = '/test';

console.log(url.pathname); // => '/path/index.html'