I’m new to javascript and am having a problem figuring out an assignment. We are supposed to use 3 prompt boxes where you can enter in your energy-bill amount for the corresponding month (jan, feb, and mar) After this we are supposed to take the responses and put them in an alert box. However, the last part of the alert box is to post the average of the 3 months worth of bills. For example the alert box should look like
january = $100
february = $200
march = $300
average = $200
However, I can’t seem to come up with a way to average the prompt responses. It seems like it should be super easy, but no matter what I do, it doesn’t calculate correctly. Any suggestions would be appreciated.
Thanks.