js将一段字符串的首字母转成大写
使用slice函数,还有非常多的方法,请打在评论区接龙<pre<code//字符串首字母大写stringToUpCase(str){returnstr.slice(0,1).toUpperCase()str.slice(1,str.length)},
使用slice函数,还有非常多的方法,请打在评论区接龙<pre<code//字符串首字母大写stringToUpCase(str){returnstr.slice(0,1).toUpperCase()str.slice(1,str.length)},
一、超时调用setTimeout()setTimeout()方法用于在指定的毫秒数后调用函数或计算表达式。<pre<codesetTimeout(coda/function,milliseconds,param1,param2,...)</code</p
字符串截取,调用系统方法<pre<codelettestStr&34;helloworld&34;//这种方法和swift3.2类似letindex1testStr.index(testStr.endIndex,offsetBy:5)