we have been experimenting with a small calculator project and ran into an interesting question about calculation logic.
For things like unit conversions, percentages, rounding, and derived values, do you normally keep everything in JavaScript, or do you prefer to handle some of the calculations server-side?
we are especially interested in how people structure the logic so it stays easy to test and doesn’t get mixed too heavily with the UI.
How do you usually approach this in your own projects?