We develop JavaScript code for the statements of our Turtle DSL. We then see how to automate the code generation with Xtext/Xtend. We also see how to support code generation for more limited APIs by moving more responsibility into the code generator.