Well im trying to make a free kart system just to learn javascript and iv got most of it done other than the sums of like buying more than one of a item?
So how would i go about multiplying a item ?
Ross
Printable View
Well im trying to make a free kart system just to learn javascript and iv got most of it done other than the sums of like buying more than one of a item?
So how would i go about multiplying a item ?
Ross
Something along those lines. Im not too good with js but i tried lol :)Quote:
<SCRIPT Language = JavaScript>
howMuch=5
itemQuant=1
total = itemQuant*howMuch
alert(total)
</SCRIPT>
Lew.
You'd use the * operator (which is pretty much the same in any language)
Here's a list of operators: http://www.w3schools.com/js/js_operators.asp
Note to Lew: The "language" attribute is deprecated, use "type" instead, eg. <script type="text/javascript">