Search for a city and show current conditions from a public API.
Difficulty: Beginner · Technology: JavaScript, public weather API
Features to build
- City search
- Error handling
- Unit toggle
- Loading state
Step-by-step build plan
- Pick a public weather API and read its docs
- Fetch data for a typed city
- Display temperature and conditions
- Handle empty input, wrong city and network errors
- Add unit toggle and recent searches
The part most people find hard
Handling failed requests without breaking the page.
How to test it
Turn off your network and check the error message.
Suggested extensions
Add user accounts, better error handling, automated tests and a README with screenshots. Each extension is a new talking point in interviews.
How to describe it on your resume
Created a weather app consuming a REST API with asynchronous JavaScript.
Portfolio tip
Deploy it, link both the live version and the code, and write two paragraphs about what you learned and what you would improve.