Learning a language (and all its little corner cases) involves writing a lot of little test programs to see how the language behaves in various situations. Here are some of my little test programs.
Higher level languages are under-represented here because this kind of exploration is best done at the ephemeral REPL. Only in the more cumbersome languages does such casual exploration leave behind artifacts that can later be gathered and archived.
The XML files will open in your browser. Modern browsers will automatically apply the xslt stylesheet, and you will see the stylesheet's output. Use View::Source to see the raw XML input.