Can I ask what the difference is between string object slice() and substr() in JavaScript?
slice()
substr()
var str="Hello world!"; document.write(str.substring(3,7)+""); document.write(str.slice(3,7)+""); document.write(str.substr(3,7));
result:
lo w lo w lo worl