1

I have an array which declare like this- arr = []. I want to check it it's empty. I tried: count(arr)==0, is_null(arr), arr==[] and arr=="".

Kfir-G
  • 11
  • 1
  • 3

1 Answers1

2

Using count would be the the idiomatic way:

arr_is_empty {
    count(arr) == 0
}
Devoops
  • 2,018
  • 8
  • 21