Last active
July 12, 2021 21:23
-
-
Save michel47/42835214f63750080a8cb73d4be5a4a1 to your computer and use it in GitHub Desktop.
Code Test
This file contains 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
<!DOCTYPE html><meta charset="utf8"> | |
<p>testing <a href=code.js title=code.js>code.js</a>... | |
<br>check the console!</p> | |
<script src="code.js"></script> |
This file contains 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
// constructing a query-string from a map (hash-table)! | |
let hash = { | |
"k1": "v1", | |
"k2": "v2", | |
"k3": "v3", | |
"k4": "v4" }; | |
let queries = Object.keys(hash).map( k => k +'='+ hash[k] ).join('&'); | |
console.log('queries:',queries); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment