const URL= require("url").Url;
const URLSearchParams= require("url");
var http=require("http");
var url_string = "http://www.example.com/t.html?a=1&b=3&c=m2-m3-m4-m5";
var url = new URL (url_string);
var c = url.searchParams.get("a");
console.log(c);
Hi I am new to javascript, I have gone through the answer for
I have run the above code but iam getting
Type error: cannot read property get of undefined.
I was not able to find the answer anywhere. Can someone please help me and tell me what my mistake is?