var str = 'jiksadsiadhiaosfdhasldp'
var obj={}
for(var i =0;i<str.length;i++){
// console.log(str[i])
var chars = str.charAt(i)
if(obj[chars]){
obj[chars] ++
}else{
obj[chars] = 1
}
}
console.log(obj)
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!