I'm trying to build a URL with multiple query parameters using template literals.
I am putting each query parameter on a separate line for readability sake. It looks like the following example, only a lot longer.
const url = `http://example.com/hey?
one=${one}&
two=${two}&
three=${three}`;
My question deals with making a multi-line literal string that has a final value without the newline (\n) character in-between each parameter. Is that possible with template literals, or should I just concatenate the string the old way?
You could use backslash at the end of the line for template literals, with more lines, but without a line break.