When I run the above code, this:
LENGTH: undefined is what i am getting. And I have already checked whether there is value inside the string.
sampleString is not null and it has value inside it. So, what am i doing wrong? Is there any other way to do it?