Last updated 5 years ago
Was this helpful?
1.去掉最后一个字符
console.log(("0,1,2,3,4,5,".slice(0,-1)))
2.
3.
var str = "123"; console.log(str.indexOf("3") != -1 ); // true