1
2
3
4
5
|
<script type=
"text/javascript"
>
var
str =
"www.taobao.com"
;
var
res = str.split(
""
).reverse().join(
""
).replace(
'oat'
,
''
);
console.log(res);
//moc.oab.www
字符方法
字符串操作方法 concat方法
slice方法、substring方法、substr方法
字符串位置方法
trim方法
字符串大小寫轉換方法
字符串模式匹配方法
replace方法
split方法
localeCompare方法
fromCharCode方法
找到匹配字符串所在的各個位置
字符串去重
判斷字符串中字符出現的次數
阿里面試-字符串操作
|