SOURCE

function qs(query) {
  // 再次输入你的代码
}

/**
 * 需要返回:{"name":"jack","age":18,"sex":"","city":"北京","country":true,"male":true,"female":false}
 */
console.log(qs('?name=jack&age=18&sex=&city=%E5%8C%97%E4%BA%AC&country&male=true&female=false'));
/**
 * 需要返回:{"name":"jack","age":18,"sex":"","city":"北京","country":true,"male":true,"female":false}
 */
console.log(qs('name=jack&age=18&sex=&city=%E5%8C%97%E4%BA%AC&children=1&children=2&children=3'));
console 命令行工具 X clear

                    
>
console