Last active
February 21, 2017 12:24
-
-
Save vladzadvorny/9b0ef40f94b03bc3cd561f2af092851a to your computer and use it in GitHub Desktop.
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
var paramsUrl = { | |
'one': 'hello', | |
'two': 'world' | |
}; | |
function httpBuildQuery(_paramsUrl) { | |
var arr = []; | |
for (var key in _paramsUrl) { | |
arr.push(key + '=' + _paramsUrl[key]); | |
} | |
return arr.join('&'); | |
} | |
console.log(httpBuildQuery(paramsUrl)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment