/wiki/TagExample.wiki

http://jsdoc-toolkit.googlecode.com/ · Unknown · 30 lines · 21 code · 9 blank · 0 comment · 0 complexity · 800672cf60fdc07396eaa12e1312e934 MD5 · raw file

  1. #summary @example
  2. == The @example Tag ==
  3. The `@example` tag allows you to provide a snippet of code that illustrates the usage of a constructor, a function (or method) or a variable.
  4. === Syntax ===
  5. {{{
  6. @example snippet
  7. }}}
  8. * snippet - Required: a snippet of code that illustrates usage.
  9. * Multiple `@example` tags are allowed.
  10. === Example ===
  11. {{{
  12. /**
  13. * @example
  14. * var bleeper = makeBleep(3);
  15. * bleeper.flop();
  16. */
  17. }}}
  18. === Note ===
  19. The @example tag is not intended to be used to generate "inline" examples, if
  20. you want this, you need to do it via HTML markup embedded within a @description
  21. block, using the `<code>` tag, for example.