I’m surprised I’ve not run into this before but Javascript has two sub string methods.
[String].substr(start, length); [String].substring(indexA, indexB);
To clarify by example:
var name = "Greg's Blog"; alert(name.substr(7, 4)); // Blog alert(name.substring(7, 11)); // Blog
Minor but caught me out this afternoon.