查找字符只出现一次的字符
getstr(str){
const checkstr = [...str].reduce((prev,item)=>{
if(!prev[item]) prev[item] = 1
else prev[item]+=1;
return prev
},{})
for(let i in checkstr){
if(checkstr[i] > 1){
delete checkstr[i]
}
}
const _str = Object.keys(checkstr)
for(let i = 0 ; i < str.length;i++){
if(_str.includes(str[i])){
return str[i]
break
}
}
},