Why js methods like map, forEach, slice, length not working in React

I have array “comments” of objects like this

{
  "pages": [1, 2, 3],
  "totalPage": 3,
  "totalCount": 26,
  "currentPage": 1,
  "comments": [ {...}, {...},  {...}, {...}, {...}, {...},]
}

But cant get his length bacause it says typeof comments is object. As the same time in jsx i could use map method. And when i write console.log(comments) it show array,but as soon as i write console.log(typeof(comments)). How can i get his length?