Converts code from one programming language to another while preserving logic
Convert the following code from {source_language} to {target_language}.
Code:
```{source_language}{code}
```
Requirements:
- Preserve all logic and functionality
- Use idiomatic style for {target_language}
- Add comments to non-obvious translation decisions
- Note any differences in behavior, if any
- Use modern syntax
0 copies
Variables
Replace these variables with your own values before using: