Error: Uncaught TypeError: data.every() is not a function
Solution 1:
The code you've provided works, you can test it in your browser's console.
The problem is you're trying to use Array methods on a variable that isn't an Array, so it's not recognizing those functions. if you're returning an answer with Fetch API make sure you add await/async
or .then()
.