first steps in code generation (JavaScript-based)