0
Explain the output?
var str = "js css html php"; var res1 = str.substring(-2, 2); var res2 = str.substr(-3, 3); var res3 = str.slice(-3); console.log(res1 + ""+ res2 + "" + res3);
1 Answer
var str = "js css html php"; var res1 = str.substring(-2, 2); var res2 = str.substr(-3, 3); var res3 = str.slice(-3); console.log(res1 + ""+ res2 + "" + res3);