DEV Community

Anuj Pancholi
Anuj Pancholi

Posted on

Answer: How to pass variables in URL in NodeJS

One way to do it is using template literals, which has been discussed in other answers (I encourage you to check out the link shared by Jason).

const phone = "1234567890";
const message = "my-message-content";

const url = `${phone}&message=${message}`


However, if…

Why node has a querystring module, to perform tasks that, at first glance, seem trivial.

Top comments (0)