Remove code duplication
Closed this issue · 2 comments
massimocode commented
The 2 calculators work fine side by side but it looks like you've duplicated both the calculator code and the html. You could do this without duplicating any code or html.
Your current calculator is using object oriented programming, so you can easily create several independent calculators with new Calculator(). That part will be easy.
For the html, try looking into the knockout foreach binding and binding onto an array of your calculators.
massimocode commented
Verified