var a = 1;
var b = 2;
var mylink = "http://website.com/page.aspx?list=' + a + '&sublist=' + b + '";
This doesn't work. Is there a simple way to insert these other variables into the url query?
In modern JavaScript standards we are using ${var}
:
var a = 1;
var b = 2;
var mylink = `http://website.com/page.aspx?list=${a}&sublist=${b}`;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With