My assignment was to write a javascript program to find the max of 10 values. I have attached the code file of my work and i need someone to check it to see why its not working the way i need it too!! Thanks!!![]()
![]()
My assignment was to write a javascript program to find the max of 10 values. I have attached the code file of my work and i need someone to check it to see why its not working the way i need it too!! Thanks!!![]()
![]()
We do not do homework. Ask a specific question.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Well, we will help with homework if you've obviously made an effort, which your code shows that you have. The main problem is that here:
input1 is a string and before you compare it to max1 which (at least originally) is a number, nothing is done to convert it to a number. So here:Code:input1 = window.prompt("Enter your 10 numbers" , "0" );
comparison is performed on the basis of alphabetizing.Code:if(input1 > max1)
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks