difference between for in and for of

14 viewsjavascriptloops
0

I have researched and I don’t quite understand the context of use of for in and for of. Could you please explain to me.
I use for of to return the value of an array, and for in to return the index of an array.
In the documentation it says that for in is used for objects. Is the array an object?

I want to understand the for in and for of