Amanpatel30/Temperature-Converter ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple JavaScript temperature converter utility.

I want three functions, one that converts Celsius to Fahrenheit, one that converts Fahrenheit to Celsius, and one that takes a number and a unit and returns a nicely formatted temperature string. Keep it straightforward and easy to read, with sensible handling for normal inputs and clear returned values.

If it makes sense, add a small example or demo in the main file so I can quickly see how each function works. Please keep the code clean and simple, and make sure the conversions are correct. If you need to check any current best practices or edge cases, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab