(arr.length) i am not able to understand this

what is arr.length and what is its significance in fore loop?

@rishabh.chhabra10,
arr.length returns an integer with length of the array.

Eg. arr = [1,2,3,4,5]

arr.length will return 5 i.e. length of array.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.