Feedback for frontendeval mortgage calculator question
I just want to preface this feedback by saying you did a great job on this question, and your write-up was fantastic! The majority of the following feedback here is along the lines of "if you weren't under a time limit in an interview / you were in a dev role and submitting code that would go to production".
-
Good job using labels correctly associated with the inputs: this is critical for screen readers and other assistive technology!
-
I liked your approach to formatting the currency: this is a really tricky problem that has a bunch of different possible solutions (number/string formatting is a pretty popular interview theme too). Thankfully for the web JS added a utility to do the heavy lifting for us: Number.toLocaleString. You can call
toLocaleString
on a number and pass in a locale