Example is the main part of Documentation, it is thus important to provide clear and useful examples.
Good examples are self-contained and succinct. Examples usually would have code for users to understand the topic better.
Refer to the Help Center for more information.