Suppose you have stored a query string that has already been processed to replace any + or URI-encoded characters in the
Posted: Sun May 15, 2022 12:14 pm
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(/=/);