My URL is:
http://localhost:3000/?sort=rating
The parameter sort
is dynamic, and I would like to add it to another URL.
In my javascript I have:
window.location.pathname + '.js?page=' + currentPage
How do I add the sort
parameter at the end?
Example:
window.location.pathname + '.js?page=' + currentPage + &sortparam
In this case it would be:
window.location.pathname + '.js?page=' + currentPage + '&sort=rating'