API Design · Middle · Question 8 of 75

How should an API represent money?

Explanation

Floats lose precision. Formatting belongs in the UI, based on the user's locale.

Further reading

Problem with a question

API Design · Middle · question 8

Test yourself

Take the API Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz