"bai-jia-xiu"变为"BaiJiaXiu"
var string="bai-jia-xiu"
console.log("bai-jia-xiu")
var str=string.split('-')
var arr=[]
for(var i=0;i<str.length;i++){
toCase(str[i])
}
function toCase(a){
var s1 = a.substring(0, 1);
var s2 = a.substring(1,a.length)
var s3 = s1.toUpperCase();
var s4 = s3.concat(s2)
arr.push(s4)
}
var finshedStr=arr.map((item)=>item).join('')
console.log(finshedStr)