Missing conversions on array index expression

XMLWordPrintable

    • b119
    • generic
    • generic
    • Verified

      An array with a single number element is not converted to an array index:

      var array = [1, 2];
      array[[0]]; // should return 1, it returns undefined

      A negative int array index is not converted to an array index either:

      var array = [];
      array[4294967294] = 1;
      array[-2]; // should return undefined, returns 1

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: