+ Reply to Thread
Results 1 to 4 of 4

Thread: Simple JS exercises - answers needed asap!!!

  1. #1
    goldy300's Avatar
    goldy300 is offline x10Hosting Member goldy300 is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Australia
    Posts
    33

    Exclamation Simple JS exercises - answers needed asap!!!

    I'm in a rush and all I want is the basic code conforming to the required instructions. ASAP needed!! 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.

    Theres three here:


    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.

    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. Modify the application so that the limit(400) can be entered by the user.

    3.Sum 1000 numbers

    Create a web application that will add up all whole numbers between 1 and 1000 and display the result.


    I appreciate any help and thanx in advance.
    Last edited by goldy300; 11-19-2008 at 08:42 AM.

  2. #2
    xmakina's Avatar
    xmakina is offline x10 Lieutenant xmakina is an unknown quantity at this point
    Join Date
    May 2008
    Location
    England
    Posts
    265

    Re: Simple JS exercises - answers needed asap!!!

    Kid, this stuff is easy. If you've been lazy to the point of putting off your own homework that you'd need for a test until the day before, that's your fault.

    Pull an all-nighter and do it yourself.
    IF($this->$post.content() == "SEE SIG"){
    w3Schools and Google
    }

  3. #3
    Scoochi2's Avatar
    Scoochi2 is offline x10 Sophmore Scoochi2 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Southport!
    Posts
    185

    Re: Simple JS exercises - answers needed asap!!!

    Quote Originally Posted by goldy300 View Post
    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
    Quote Originally Posted by goldy300 View Post
    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);
    Quote Originally Posted by goldy300 View Post
    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);
    Quote Originally Posted by goldy300 View Post
    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);
    Quote Originally Posted by goldy300 View Post
    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);
    If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:

  4. #4
    goldy30's Avatar
    goldy30 is offline x10Hosting Member goldy30 is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    60

    Thumbs up Re: Simple JS exercises - answers needed asap!!!

    Thanks man. I see how simple it is now. 2:30am here now and last night was an all nighter... I've done 20 of 29 js exercises and I've got so much other stuff I'm trying to do.

    Appreciated!!

+ Reply to Thread

Similar Threads

  1. Simple Slideshow script/module needed for CMS
    By stevet70 in forum Programming Help
    Replies: 4
    Last Post: 11-10-2008, 04:10 PM
  2. IPB Helped Needed ASAP
    By mysticgfx in forum Scripts & 3rd Party Apps
    Replies: 15
    Last Post: 04-08-2008, 09:00 PM
  3. URGENT - Help needed asap
    By Dazz in forum Free Hosting
    Replies: 3
    Last Post: 11-16-2007, 10:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers