I am trying to make a JavaScript calculator form. I know there are some out there but they don't do exactly what I want to I am looking at doing my own.
It is slightly more complicated than a normal one.
Let's say I have items I want to sell. The customer can choose to customise an item and the calculator needs to work out the cost accordingly.
So for example:
The items can be small, medium or large - each will have a base price
They can be 1 colour or 2 colours, each has a separate price
And the price per 100 depends on how many they buy. So for example if they buy 200 then it's £5.99 each. If they buy 500 then it's £5.50 each etc.
What is best to do here?
Should I be using arrays here or possibly storing in variables or using IF ELSE statements?
Bookmarks