documentation: added javascript codegen section to tutorial