Reading Technical Documentation
Documentation helps you choose an appropriate method and understand what it actually does. Start with a specific question, such as whether a method changes an array or returns a new value.
Read in a useful order
- Confirm you found the correct JavaScript or browser API page.
- Read the short description and syntax.
- Check required and optional parameters, including their types.
- Read the return value. Does the method return data, a promise, or no useful value?
- Check side effects: does it change an array, the DOM, or stored data?
- Read relevant exceptions and browser support notes.
- Compare an example with your own data and context before adapting it.
An example may omit error handling or use a different data shape. Understand its assumptions instead of copying an entire sample into your application.
Record the decision
Keep a short note: the question, documentation link, what you learned, and how it affected your code. Explain the method in your own words. Use official API documentation or an established reference such as MDN.
Start from the MDN JavaScript reference for language features and the Web API reference for browser features.
Checklist
- [ ] I have a specific question.
- [ ] I checked parameters, return value, and side effects.
- [ ] I understand the example's assumptions.
- [ ] I tested the adapted behaviour in my own context.
- [ ] I recorded the reference when it helps explain a decision.