const myUrlWithParams = new URL("https://www.softhunt.net/"); myUrlWithParams.searchParams.append("city", "Karachi"); myUrlWithParams.searchParams.append("price", "$200k"); console.log(myUrlWithParams.href);