Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Help with this

  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with this

    I need help with this mini project.

    Heres what my output needs to look like -
    Strings as entered:
    variableOne: Rose
    variableTwo: Daisy

    Switched strings:
    variableOne: Daisy
    variableTwo: Rose

    Heres my code:
    //Variables

    var flowerOne;
    var flowerTwo;

    //prompts

    flowerOne = prompt('Enter a name of a flower: ');
    flowerTwo = prompt('Enter a name of a second flower: ');

    //Outputs

    document.write('Strings as entered: ');
    document.write('<br />');
    document.write('Flower one: ');
    document.write(flowerOne);
    document.write('<br />');
    document.write('Flower two: ');
    document.write(flowerTwo);
    document.write('<br /><br />');
    document.write('Switched strings: ');
    document.write('<br />');
    document.write('Flower one: ');
    document.write(flowerOne);
    document.write('<br />');
    document.write('Flower two: ');
    document.write(flowerTwo);



    // END OF YOUR CODE

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,298
    Thanks
    203
    Thanked 2,561 Times in 2,539 Posts
    You have asked this before at

    http://www.codingforums.com/showthread.php?t=302114

    Double posting is very much frowned on in this forum. See Rule # 1.2.

    And you have had answers in your previous post. You seem to be quite impervious to them. We will not do your homework for you.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


  •  

    Posting Permissions

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