Skip to main content

keys

method URLSearchParams.prototype.keys
Jump to headingURLSearchParams.prototype.keys(): IterableIterator<string>

Returns an ES6 Iterator over the names of each name-value pair.

const params = new URLSearchParams('foo=bar&#x26;foo=baz');
for (const name of params.keys()) {
  console.log(name);
}
// Prints:
//   foo
//   foo

Return Type Jump to heading

IterableIterator<string>
Back to top