How to get a array lengh?

Try this:

arr.size()
5 Likes