// 将the-first-name经过处理之后变成小驼峰式写法theFirstName
var reg = /-(w)/g;
var str = 'the-first-name';
console.log(str.replace(reg, function($, $1) {
return $1.toUpperCase();
}));
最后
以上就是英勇世界最近收集整理的关于将the-first-name经过处理之后变成小驼峰式写法theFirstName的全部内容,更多相关将the-first-name经过处理之后变成小驼峰式写法theFirstName内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复