code generation for javascript