String Operations:
What will be the Output of the Following Code
var ContentURL="http://MySite1/online-tests/1111-First-questions";
ContentURL= ContentURL.substring(ContentURL.lastIndexOf("/")+1,ContentURL.length);
var LastIndex;
if(ContentURL.indexOf('-')>-1)
LastIndex=ContentURL.indexOf('-');
else
LastIndex=ContentURL.length;
ContentURL= ContentURL.substring(ContentURL.lastIndexOf("/")+1,LastIndex);

 Posted by Lakhangarg on 10/30/2009 | Category: JavaScript Interview questions | Views: 9824
Select from following answers:
  1. online
  2. tests
  3. 1111
  4. questions
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response