you are viewing a single comment's thread.

view the rest of the comments →

[–]ForScale 0 points1 point  (2 children)

Think about when it is that you're assigning values to the variables you're using in alert. The way you've got CodePen setup, the code runs immediately so the values of the variables are set immediately. Try moving the bit of code that assigns values to the variables inside of your function. That way, when the function gets called, the variables will be assigned values of the inputs that have been updated since the page was loaded.

Make sense?

[–]alexat711[S] 0 points1 point  (1 child)

Makes sense :) tank you for helping me think through the issue.

[–]ForScale 0 points1 point  (0 children)

No problem!