1. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060


    Any help would be appreciated! :p
     
  2. RyanJF1 Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jul 1, 2012
    Messages:
    6,450
    Trophy Points:
    51,990
    Gender:
    Male
    Ratings:
    +949
    You don't need the semicolon for the if and else statements.

    Code:
    if (40 > 39)
    {
    console.log("I am right");
    }
    else (40 < 39)
    {
    console.log("I am wrong");
    }
     
  3. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060
    It worked! Thanks for the help!
     
  4. Jetscat Builder
    Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️

    Joined:
    Oct 8, 2011
    Messages:
    4,039
    Trophy Points:
    48,490
    Gender:
    Male
    Ratings:
    +993
    Your using code academy. :p

    That's what I used.
     
  5. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060
  6. rockboy2000 Mayor
    Mayor ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Oct 19, 2012
    Messages:
    1,335
    Trophy Points:
    54,410
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +310
    That's what we all used.
     
  7. vdubmastertech Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Mar 7, 2012
    Messages:
    628
    Trophy Points:
    32,190
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +150
    Don't put your variable names in double quotes when you call them in a function.

    You only want the first 3 letters so it would be .substring(0-2) , this is because the first letter in the string is actually "0" second is "1" etc.
     
    #7 vdubmastertech, Sep 2, 2013
    Last edited: Sep 2, 2013
  8. RyanJF1 Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jul 1, 2012
    Messages:
    6,450
    Trophy Points:
    51,990
    Gender:
    Male
    Ratings:
    +949
    When something is in "", then it is considered a string. It should just be myCountry.

    Code:
    var myCounty = ("United States")
    console.log(myCountry.length);
    console.log(myCountry.substring(0-2));
     
    #8 RyanJF1, Sep 2, 2013
    Last edited: Sep 2, 2013
  9. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060


    Thank you again!
     
  10. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060
    Code:
    var myCountry = ("United States")
    console.log(myCountry.length);
    console.log(myCountry.substring(0,3));
    This wound up being the correct code, but thank you!
     
  11. vdubmastertech Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Mar 7, 2012
    Messages:
    628
    Trophy Points:
    32,190
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +150
    You're welcome. Also if you get stuck just go to the Q&A Forum for that section. It's in the bottom left hand corner. You can usually find the solutions to most of the problems there. If you are like me you probably understand the lesson better by seeing the completed code first and then breaking it down in your head to understand what each part does.
     
  12. vdubmastertech Builder
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️

    Joined:
    Mar 7, 2012
    Messages:
    628
    Trophy Points:
    32,190
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +150

    Yes that's actually correct. Sorry I always forget substring actually uses the last number as the "cut-off" position.
     
  13. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060
  14. pdgwien Builder
    Builder ⛰️ Ex-Resident ⚒️

    Joined:
    Sep 1, 2013
    Messages:
    17
    Trophy Points:
    29,130
    Gender:
    Male
    Ratings:
    +0
    Again, no semicolons after if or else.

    Code:
    if (feedback > 8) {
    console.log("Yay!");
    } else {
    console.log("Nay!");
    }
    
     
  15. Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Jan 9, 2013
    Messages:
    564
    Trophy Points:
    32,390
    Gender:
    Male
    Ratings:
    +333
    EEWWW WHAT LANGUAGE IS THIS?! It looks disgusting... #Java
     
  16. Xslare Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Jun 24, 2013
    Messages:
    127
    Trophy Points:
    29,690
    Ratings:
    +44
    #16 Xslare, Sep 19, 2013
    Last edited: Sep 19, 2013
  17. Nelsin Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Feb 24, 2012
    Messages:
    1,340
    Trophy Points:
    33,340
    Ratings:
    +175
    It isn't java as codeacademy doesn't have Java
     
    #17 Nelsin, Sep 19, 2013
    Last edited: Sep 19, 2013
  18. JamieSinn Retired Lead Administrator/Developer
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Jun 4, 2011
    Messages:
    5,447
    Trophy Points:
    82,090
    Gender:
    Male
    Ratings:
    +4,567
    Looks like JavaScript to me
     
  19. Dccciz Nicememer55
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Mar 8, 2013
    Messages:
    2,802
    Trophy Points:
    54,090
    EcoDollars:
    $0
    Ratings:
    +2,060
    It's Java
     
  20. Nelsin Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Feb 24, 2012
    Messages:
    1,340
    Trophy Points:
    33,340
    Ratings:
    +175
    It has it! I never knew