|
|
 |
RE: FN-FORUM: javascript beginner
date posted 24th January 2006 13:26
Thank you!! I did have it in an html document but because of the error it
didn't work
So upon correcting it, it worked....thank you so much!
Gina
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Sam Morgan
Sent: 24 January 2006 11:12
To: FN-FORUM / [EMAIL REMOVED]
Subject: RE: FN-FORUM: javascript beginner
Your script is slightly wrong but also you need to load it in a html page.
var biggestNumber;
var theSum=0;
biggestNumber=window.prompt('Please input a value ','');
biggestNumber=parseFloat(biggestNumber);
for (count = 1; count I'm just doing a course on javascript (total javascript
> beginner) and wrote
> the following lines:
>
> var biggestNumber;
> var theSum=0;
>
> biggestNumber=window.prompt('Please input a value ','');
> biggestNumber=parseFloat(biggestNumber);
> for(var count = 1; count {
> theSum = theSum + count
> window.alert('The sum of the numbers from 1 to ' +
> biggestNumber + ' is ' +
> theSum)
>
> Now the next calculation I'm supposed to do is: to calculate
> the sum of the
> numbers from 1 to 10,000, and I need to post the result of the output.
>
> Where and how do I test my program? I wrote it in notepad and
> tried viewing
> it in a browser, but must be doing something wrong? Sorry,
> this is probably
> a really silly question, but I'm kind of stuck.
>
> Thanks in advance for your patience,
>
> Regards Gina
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|