let params={id:1}; let paramsStrArr=['id'].reduce((acc,cur)=>{ acc.push(cur+'='+params[cur]) return acc },[]); alert(paramsStrArr)