zk0

02-15-2007, 01:55 PM

Hi,

Can someone explain to me how I should code to calculate this?

I want to let the user add 4 different numbers (this is done) and then I want to + these numbers with each other.

This is the code I got:

var medel = tal1+tal2+tal3+tal4 ;

Let say the user enters 1+2+3+4. Then the result should be 10. But I get this number as result: 1234

What have I done wrong?

Thanks for any help!

Can someone explain to me how I should code to calculate this?

I want to let the user add 4 different numbers (this is done) and then I want to + these numbers with each other.

This is the code I got:

var medel = tal1+tal2+tal3+tal4 ;

Let say the user enters 1+2+3+4. Then the result should be 10. But I get this number as result: 1234

What have I done wrong?

Thanks for any help!