By looking at:
parseQueryString().CustomConfigPath
you can say that parseQueryString()
is expected to return an object with CustomConfigPath
property.
And from this:
var result = {};
you see that result
is indeed an object ({}
is an empty object literal). It is not an array. Later, in a loop, there is:
result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
so we're assigning properties to the result
object. One of this properties will be (as we can expect) a CustomConfigPath
. This will be taken from the query string - we'll use regular expression to do this: re = /([^&=]+)=([^&]*)/g
. So address of the webpage on which this code is executed looks like: http://example.com/something?SomeKey=value&CustomConfigPath=something
.
General syntax for assigning properties to an object is:
result[key] = value;
// key -> decodeURIComponent(m[1])
// value -> decodeURIComponent(m[2])