79096638

Date: 2024-10-17 05:54:38
Score: 0.5
Natty:
Report link

The return value may not be suitable for an array method. forEach is an array method, if there is no suitable structure for it, it will not be displayed in the interface as it will return an error. details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

For example, when I request https://jsonplaceholder.typicode.com/todos/1 point, I cannot use the array method for this response. But when I get the https://jsonplaceholder.typicode.com/todos/ items, I can now use the array methods.

enter image description here

First, check the return values ​​from the 'dat.json' request from the http requests. Then you can convert the values ​​from the request into a suitable structure for the array.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: mefisto