add two var together

Results 1 to 2 of 2

Thread: add two var together

  1. #1
    Join Date
    Dec 1969

    Default add two var together

    Hi, i have a simple question: <BR>i got two variable<BR>var temp ="1";<BR>var temp2= "2";<BR>temp3 = temp1 + temp2;<BR><BR>temp3 will equal to 12 in this case, but how can i make it equal to 3 instead?<BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: add two var together

    i should really RTFM you for this but I won&#039;t<BR><BR>temp3 = parseInt(temp1) + parseInt(temp2);<BR><BR>I will however say "duh?&#039;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts