0

I am developing windows app in windows phone Silverlight 8.1 solution.

when i am using the try catch i get error saying funtion expected.

Here is my piece of code:

try
{
    alert("blogCategoryId is : " + blogCategoryId.length());
}
catch (err) {
    alert("Error is :" + err.message);
}

And is there alternative of .length() funtion.

Dilip Kumar Yadav
  • 565
  • 1
  • 7
  • 27

1 Answers1

0

I wanted to get the each element of blogCategoryId if the elements are more than 1, and i got it with the following code:

if (blogCategoryId.length>1)
{
    var digits = ("" + blogCategoryId).split("");
    for (var i = 0; i < digits.length; i++) {
        alert("The length is greater :"+digits[i]);
    }
}
Dilip Kumar Yadav
  • 565
  • 1
  • 7
  • 27