How-To

XCODX

How-To Guides

Task-focused guides that show you the right way to get one specific thing done — with runnable code.

A how-to answers one practical question — "how do I sort an array?", "how do I remove duplicates?" — with the clearest correct solution, not a wall of theory. Each guide gives you the recommended approach, the reason it's recommended, the common pitfalls, and code you can run and adapt immediately.

Where several approaches exist, the guide shows the modern, idiomatic one first, then explains the trade-offs of the alternatives so you can choose deliberately. Every snippet is tested before it ships, and most run live on the page.

Browse by language below.

Frequently asked questions

What's the difference between a how-to and a reference page?
A reference page documents a single feature (like Array.sort) in full. A how-to solves a real task (like "sort an array of objects by a field"), which may combine several features, and focuses on the recommended solution and its pitfalls.
Is the code tested?
Yes. Every code example is executed and verified before publishing, and most are runnable directly on the page so you can confirm the result yourself.
Which languages have how-to guides?
JavaScript and Python today, with more added over time. Each guide is written for the current, idiomatic version of the language.