The JS backend now detects `let main = fn() => ...` patterns and auto-invokes them at the end of the generated code, matching the interpreter's behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>