Skip to content

Instantly share code, notes, and snippets.

@carbide-public
Created February 4, 2022 18:45
Show Gist options
  • Save carbide-public/5cc79291ffcc8c4548edebc296bd7361 to your computer and use it in GitHub Desktop.
Save carbide-public/5cc79291ffcc8c4548edebc296bd7361 to your computer and use it in GitHub Desktop.
untitled
let word = 'red'
let endpoint = 'https://en.wiktionary.org/api/rest_v1/page/definition'
let url = `${endpoint}/${word}`
let resObj = await fetch(url, {orgin:'test'})
let res = await resObj.json()
let output = ''
for (let meaning of res.en) {
output += meaning.partOfSpeech
for (let definition of meaning.definitions) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment