Prompt Details
Model
Chat - (gpt-5)
Token size
168 ($0.00525 / call)
Example input
[SOURCE_LANGUAGE]: Python
[TARGET_LANGUAGE]: JavaScript
[PASTE_SOURCE_CODE_HERE]: def factorial(n): if n == 0: return 1 else: return n * factorial(n - 1) print(factorial(5))
Example output
function factorial(n) {
if (n === 0) {
return 1;
} else {
return n * factorial(n - 1);
}
}
console.log(factorial(5));
By purchasing this prompt, you agree to our terms of service
GPT-5
A powerful prompt for translating code between programming languages while preserving the original logic, structure, and intent, and rewriting it using idiomatic patterns and best practices of the target language.
...more
Added over 1 month ago
