Passing parameter in URL

Hi there!
I am trying to pass the email parameter to a URL by doing the following:
let emailValue=user.getEmail()
.then( (email) => {
return email.toString(); //eg. myemail@mail.com
} );

Then in a button I want to use the link feature to pass the email in the URL like this example www.somewebsite.com/somepage?email=“+emailValue+”

When the URL opens it shows me something like this ?email=" +emailValue+ " instead of
?email=myemail@mail.com

How may I pass the email value as parameter?

Try using back ticks instead of " " or ’ ’ to write your url. Then put something like this inside the wixLocation.to() function:
/myInternalURL?email=${emailValue}.

That is, with the back ticks , you can use ${variableName} to put the value of a variable inside a string. See https://stackoverflow.com/questions/3304014/how-to-interpolate-variables-in-strings-in-javascript-without-concatenation .