Skip to content

Commit c4dec19

Browse files
author
russom
committed
the for loop for testing values containing = fixed
1 parent c66861d commit c4dec19

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎Sprint-2/implement/querystring.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ function parseQueryString(queryString) {
66
const keyValuePairs = queryString.split("&");
77

88
for (const pair of keyValuePairs) {
9-
const [key, value] = pair.split("=");
9+
const everything = pair.split("=");
10+
const key = everything.shift();
11+
const value = everything.join("=");
1012
queryParams[key] = value;
13+
14+
//console.log(key);
15+
//console.log(values);
16+
//const [key, value] = pair.split("=");
17+
//queryParams[key] = values;
1118
}
1219

1320
return queryParams;

0 commit comments

Comments
 (0)