Last active
December 4, 2019 10:02
-
-
Save Himura2la/8d12fa0fa4a02c7a981b1fbeed443480 to your computer and use it in GitHub Desktop.
Assemble a URL using jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let makeURL = (origin, location, parameters) => [origin, ...location].join('/') + '?' + $.param(parameters) | |
makeURL(window.location.origin, [ 'search' ], { 'query': 'hello world' }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment