some basic code for js codegen