Suppose you have stored a query string that has already been processed to replace any + or URI-encoded characters in the
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Suppose you have stored a query string that has already been processed to replace any + or URI-encoded characters in the
Suppose you have stored a query string that has already been processed to replace any + or URI-encoded characters in the variable queryString. What belongs in the blank in the following JavaScript code if you want to print the names and values of the form fields to the log? let formInfo = queryString.split(/&/g); for (let items of formInfo) { let fieldName = fieldValuePair[0]; let fieldValue = fieldValuePair[1]; 11 11 console.log("Name: + fieldName + ', value: + fieldValue); } let fieldValuePair = decodeURIComponent (queryString); let fieldValuePair = queryString.replace(/\+/g, 11 "); let fieldValuePair = items.split(/&/); let fieldValuePair items.split(/=/);
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!