Possible Duplicate:
What is the difference between substr and substring?
I just want to clarify this differences of:-
alert("abc".substr(0,2));
alert("abc".substring(0,2));
the above case both will return
ab
alert("abc".substr(1,2));
alert("abc".substring(1,2));
and the above case will return first bc
and the second one b
so basically for the substr
the second argument is the length it has to go?
and for substring
it will stop but not include??
Please correct me if I'm wrong because we will have a quiz today and I don't want to get this wrong again.