Index() function returns unexpected output

Certified Senior Developer

When I try index({1,2,3},{3,4},"") returns {3,null} whereas index({1,2,3},{3,4},{}) returns {3,1}. Looks like when curly brace is put in default parameter, when there is no 4th index, it goes back to start and picks the first index. i don't think this behaviour is captured in documentation either.

  Discussion posts and replies are publicly visible