Create a dictionary page that shows word definitions from the Free Dictionary API. The API documentation can be found at https://dictionaryapi.dev/.
- Open the developer tools in your browser and try the API with different words. Figure out how to get a definition from the returned JSON object.
- Check what the response is when no definition is found.
- Copy-paste
index.html
andscript.js
below into VSCode and openindex.html
with live server. - Complete
script.js
to show the first definition of the word from the input field when the user clicks the submit button. Don't forget to handle the case when no definition is found. - Stretch goal: include all definitions of the word and the example sentences.