This Gist was automatically created by Carbide, a free online programming environment.
Created
February 4, 2022 18:45
-
-
Save carbide-public/5cc79291ffcc8c4548edebc296bd7361 to your computer and use it in GitHub Desktop.
untitled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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