
Originally Posted by
goldy300
I know it's like asking for the answers without doing the research but by doing this I'm able to see, modify and understand it later on. But in the mean time, I need it now to pass an open book test tomorrow.
rofl.
Why not look in the book for the answers? It's open book, remember! :D

Originally Posted by
goldy300
1.Wordcount
Create a web application that requests a word as input and displays the word followed by the number of letters in the word.
Code:
var word = window.prompt('What word do you have?','');
window.alert(word+' '+word.length);

Originally Posted by
goldy300
2.POSITIVE NUMBERS
Create a web application that asks the user to enter positive numbers into the computer until the product of the numbers exceeds 400. The application should then display the product.
Code:
var total=0;
while (total < 400) {
total += parseFloat(window.prompt('Total is less than 400, please enter another number',''));
}
window.alert('Your total is '+total);

Originally Posted by
goldy300
Modify the application so that the limit(400) can be entered by the user.
Code:
var limit = parseFloat(window.prompt('What is the maximum number allowed?',''));
var total=0;
while (total < limit) {
total += parseFloat(window.prompt('Total is less than '+limit+', please enter another number',''));
}
window.alert('Your total is '+total);

Originally Posted by
goldy300
3.Sum 1000 numbers
Create a web application that will add up all whole numbers between 1 and 1000 and display the result.
Code:
var total = 0;
for (i=1;i<=1000;i++) {
total += i;
}
window.alert('Total: '+total);