javscript Q

Out of context: Reply #1

  • Started
  • Last post
  • 6 Responses
  • welded0

    I'm not an expert by any stretch, but it's clear that result is concatenating the numbers instead of adding them, so it must think they're strings. I've had a similar problem in the past, but can't find the file in question. The gist of it is you've got to convert it to a number. I *think* I just multiplied it by one, or something. I can't remember. :\
    I'm sure there are better, smarter ways.

View thread