so i'm currently trying to figure out what the code below will output. I'm confused by the substr function so if you could explain that it would be amazing. Thanks
function getAttackString() {
var foo = "d32329b34";
var bar = "x38h309hj";
return "The code is: "+(foo.substr(3,foo.length-6))+(bar.substr(2));
}
console.log(getAttackString());
No comments:
Post a Comment