Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript foreach url parameter

// Create a test URLSearchParams object
var searchParams = new URLSearchParams("key1=value1&key2=value2");

// Log the values
searchParams.forEach(function(value, key) {
  console.log(value, key);
});
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #foreach #url #parameter
ADD COMMENT
Topic
Name
8+3 =