I'm having trouble storing the result from this fetch to an array:
const words = []
fetch("https://random-word-api.herokuapp.com/word?number=100")
.then(response => response.text())
.then(result => console.log(result))
.then(function (data) {
for (var i = 0; i < result.length; i++) {
words.push(data.result[i])
console.log(words)
}
})
.catch(error => console.log('error', error));
let promise = fetch("https://random-word-api.herokuapp.com//word?number=10")