0

I am getting this errorenter image description here

When I run the below code :

for (var key in props)
{
    if (props.hasOwnProperty(key))
    {
        switch (key)
        {
            case "dataList":
                var itemList = props[key];

                if (itemList && itemList.itemCountKnown && (typeof itemList.itemCount === "number") && (itemList.itemCount > poolSize))
                {
                    poolSize = itemList.itemCount;
                }
                if (itemList)
                {
                    var item = "" ;
                    for (item of itemList.items)
                    {
                        if (item.text1Id == strId)
                        {
                            break;
                        }
                        focussedItem += 1;
                    }
                }
                break;

It gives the error as shown in the image. And I tried to find it online but could not find anything relevant . Kindly let me know what is the problem ???

YepMe
  • 159
  • 2
  • 11
  • 2
    Browser probably doesn't support for...of – Andrew Li Jun 15 '17 at 01:51
  • http://kangax.github.io/compat-table/es6/#test-for..of_loops https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#Browser_compatibility – Bergi Jun 15 '17 at 01:53
  • See [Bug 791343](https://bugzilla.mozilla.org/show_bug.cgi?id=791343). It may be helps. – Alexander Jun 15 '17 at 02:15

0 Answers0