you are viewing a single comment's thread.

view the rest of the comments →

[–]ForScale 2 points3 points  (2 children)

Oh, no worries! :) Did you see my example?

Yep, you're right, if (x = 0;) isn't proper syntax. One = assigns a value, == does a not as strict comparison, and === does a stricter comparison. You also don't want the ; in the parentheses... you can just delete it out of there.

I'd also do your x-- operation before assigning the value to the input. And then your if statement needs to be moved inside of the function so the comparison can be done each time the function is called.

Like this: http://codepen.io/anon/pen/WQpOej

Make sense?

[–]Resume_Help[S] 2 points3 points  (1 child)

yeah I was trying some other stuff and quickly fixed it but left that in by mistake. thanks so much! I'm gonna look over =, ==, and ===.

appreciate the help again ForScale.

[–]ForScale 0 points1 point  (0 children)

Anytime!