The problem i see here is that you are looking for the result but ignoring the data. You didin't even looked at the return of the indexOf test.
First:
Quote:
In This Condition ,'+918869472915' is a Indian Number but it returns me False .This is my Problem .If you Check i have not submitted this type of question before this ..so how could you say this is a repeated question ..Please check it.
That's incorrect. Because this:
Quote:
if (val.indexOf(1) == 11 && val.indexOf(5) == 12) {
Will find something like this:
+9(1)886947291(5)
---2-------------12
You could use val.charAt(11) to check if the character equals to the desired value at a specific position. If the Indian numbers always have the number 15 at the end, you should just check for it.
Anyway, people are less eager to help if you just ask for solutions.