enumerate

Certified Senior Developer

Another technical question on how  enumerate works. Can some one explain

index({10,30,40,50,60,70},enumerate(5),{})

returns

10; 20; 20; 30; 40

Expected out 

10; 20; 30; 40

But same works with below std code , but not sure why?

index({10,20,30,40,50,60,70},enumerate(5)+1,{})

output :

10; 20; 30; 40; 50

Syntax

enumerate(n)

Returns a list of integer numbers from 0 through n-1.
Returns: List of Number (Integer)
n (Number (Integer)): The number of integer numbers to return.

  Discussion posts and replies are publicly visible