Public
Script
Forked from nbbaier/URLSearchParamsPuzzle
July 12, 2024
1
2
3
4
5
6
7
8
9
10
11
12
// Create a test URLSearchParams object
const searchParams = new URLSearchParams("key1=value1&key2=value2");
// Display the key/value pairs
for (const [key, value] of searchParams.entries()) {
console.log(`${key}, ${value}`);
}
// Display the keys
for (const key of searchParams.keys()) {
console.log(key);
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
July 12, 2024