To get to know a language a little better, this is a fun way to spend an hour.<p>Simply try and use all the keywords of a language of choice. Then try to reduce the code to contain each keyword as few times as possible. Also, try to remove as much as possible that isn't a keyword.<p>The code should run, and all paths should be executed.<p>This is my Javascript snippet containing all keywords only once (except "this" which occurs twice). Only one non-keyword is used -- the variable "e".<p>Have fun!<p><pre><code> try {
do { var e; continue } while (void delete typeof null in undefined)
} catch(e) {
with(e)
if ((function(){
for (;;) break;
switch (true instanceof this){
case false:
default: throw new this
}
return
})());
else;
} finally {}</code></pre>