Ad
  • Default User Avatar
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thank you for your feedback =)

  • Custom User Avatar

    Well, Array.range(-1,1) should return [-1]. You've read the description wrong:

    Array.range(start, count) should return an array containing 'count' numbers from 'start' to 'start + count'.

    Honestly, that line is still misleading, since start + count isn't part of the array. However, the second argument isn't an upper bound on the range, but the number of elements. Some other examples to make this clear:

    // for any i:
        Array.range(i,0) == []             // no element
        Array.range(i,1) == [i]            // one element
        Array.range(i,2) == [i, i+1]       // two elements
        Array.range(i,3) == [i, i+1, i+2]  // three elements
    
    // some concrete examples:
        Array.range(100, 1) == [100]
        Array.range(10, 1)  == [10]
        Array.range(-10, 4) == [-10, -9, -8, -7]
        Array.range(12515235, 0) == []
    

    HTH.