Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf89592 commit 8346b54Copy full SHA for 8346b54
README.md
@@ -196,3 +196,22 @@ const user = {
196
const { education : { degree } }
197
console.log(degree) //Masters
198
```
199
+
200
+# URLSearchParams
201
202
203
+```javascript
204
+//The URLSearchParams interface defines utility methods to work with the query string of a URL.
205
206
+const urlParams = new URLSearchParams("?post=1234&action=edit");
207
208
+console.log(urlParams.has('post')); // true
209
+console.log(urlParams.get('action')); // "edit"
210
+console.log(urlParams.getAll('action')); // ["edit"]
211
+console.log(urlParams.toString()); // "?post=1234&action=edit"
212
+console.log(urlParams.append('active', '1')); // "?post=1234&action=edit&active=1"
213
+```
214
215
216
217
0 commit comments