JS) TypeError
JS) TypeError
Problem
개발자 도구에서 ‘Uncaught TypeError: response.forEach is not a function’ 오류를 볼 수 있었습니다.
Solution
Reference에서 First option을 참고했는데 response가 object와 같은 Array인 NodeList type이라서 해당 오류가 발생하였고 아래와 같이 해결했습니다.
Reference
https://stackoverflow.com/questions/35969974/foreach-is-not-a-function-error-with-javascript-array
This post is licensed under CC BY 4.0 by the author.