Forum : what is the meaning of
Brief description  about Online courses   join in Online courses
View neeraj  khatri 's Profile

what is the meaning of

respected sir..
what is the meaning of these two lines

var brVerid=brVer.indexOf('MSIE');
brNum=brVer.substr(brVerid,8);


Asked by neeraj khatri | Aug 20, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Neeraj,

indexOf() - Returns the position of the first found occurrence of a specified value in a string

substr() - Extracts the characters from a string, beginning at a specified start position, and through the specified number of character

It means in the above case,
if brVer = ahbvhfadfbkajf...MSIE....sgfhgakhdghk,

var brVerid=brVer.indexOf('MSIE'); // this will get start position
brNum=brVer.substr(brVerid,8); // here we are using that result to get substring.
Aug 23, 2010