1. Help with javascript

A friend of mine ask me to help her with a problem the thing is i have not done javascript in many years now. I cant seem to get the loop to run

Question
Write an algorithm that takes two numbers and calculates the
product of the numbers using the binary operator '+' only i.e. the
algorithm should NOT use the binary operator 'x'.

Solution
<html>
<title>
Calculator
</title>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function doMath() {
var one = eval(document.theForm.elements[0].value)
var two = eval(document.theForm.elements[1].value)
count = 0

while (count<=two)
{
var prod = one + one
count == count +1
}

alert("The product of " + one + " and " +
two + " is " + prod + ".")
}
// End -->
</SCRIPT>

<body>

<CENTER>
<FORM NAME="theForm">
Multiply
<INPUT TYPE="text">
By
<INPUT TYPE="text">
<INPUT TYPE="button" VALUE="Show result" onClick="doMath()">
</FORM>
</CENTER>

</body>
</html>

2. Dont worry i found the error solution is below

<html>
<title>
Calculator
</title>
<script type="text/javaScript">

<!-- Begin
function doMath() {
var one = eval(document.theForm.elements[0].value);
var two = eval(document.theForm.elements[1].value);
var prod=0;

for (var i=0; i<two; i++)
{
prod = prod + one;
}
alert("The product of " + one + " and " +
two + " is " + prod + ".")
}
// End -->
</script>

<body>

<CENTER>
<FORM NAME="theForm">
Multiply
<INPUT TYPE="text">
By
<INPUT TYPE="text">
<INPUT TYPE="button" VALUE="Show result" onClick="doMath()">
</FORM>
</CENTER>

</body>
</html>

Posting Permissions

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