use*_*607 1 javascript python string substring
所以我在javascript中有一个字符串
var s="may the force";
Run Code Online (Sandbox Code Playgroud)
而我只想要the force
部分,在python中我可以做s[4:]
,所以在javascript 中有任何等价物吗?
你可以使用:
var s = "may the force";
var t = s.substring(4);
alert(t); //alerts "the force"
Run Code Online (Sandbox Code Playgroud)
检查这个小提琴
归档时间: |
|
查看次数: |
240 次 |
最近记录: |