Skip to main content
URLSearchParams.prototype.keys - node__url.d.ts - Node documentation
method URLSearchParams.prototype.keys

Usage in Deno

```typescript import { URLSearchParams } from "node:node__url.d.ts"; ```
URLSearchParams.prototype.keys(): IterableIterator<string>
Returns an ES6 `Iterator` over the names of each name-value pair. ```js const params = new URLSearchParams('foo=bar&foo=baz'); for (const name of params.keys()) { console.log(name); } // Prints: // foo // foo ```

Return Type

IterableIterator<string>