Question: I have data like this:

```
data = [
         { 'name':'suresh', 'age':25}
         { 'name':'ramesh', 'age':35}
         { 'name':'raina', 'age':15}

      ]

```

I have tried like 

```
  for(let ele in data){
     consolelog(ele)
   }

```

**Current Output**

```
 0
 1
 2

```

**Expected Output**

```
     { 'name':'suresh', 'age':25}
     { 'name':'ramesh', 'age':35}
     { 'name':'raina', 'age':15}

```

Answer: 
It's because by doing this:

```js
for(let ele in data){
  consolelog(ele)
}

```

You're looping the properties of the array. An array is really just an object with the properties `0`, `1`, `2`, ...

There are several ways to loop an array. In my opinion the two most common are:

```js
// old-school...
for (let i = 0; i < data.length; i++) {
  console.log(data[i]);
}

// ... new-school (ES5+)
data.forEach(ele => console.log(ele));

```
Try this code this work for me

`for (let ele in data) {
 console.log(data[ele])
}`