Skip to content

Instantly share code, notes, and snippets.

@michel47
Last active Jul 12, 2021
Embed
What would you like to do?
Code Test
<!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>
// 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