Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default This shit is stupid

    Okay for the past five minutes I've been told I'm doing some Java wrong. Instructions: http://prntscr.com/18dttz

    Code:

    // Use console.log( ) to print out the substrings.
    // Here is an example of the 1st to 4th letter of "JavaScript":
    // console.log("JavaScript".substring(0,4));
    console.log("January".substring(0,3));
    console.log("Melbourne is great".substring(0,12));
    console.log("Hamburgers".substring(3,0));

    It wants me to get burgers out of hamburgers and I did the whole string correctly and it still says its wrong?

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  2. #2
    I agree. MatthewH's Avatar
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    North Carolina
    Posts
    3,481
    Points
    15,810

    Default

    You're doing the substring wrong I think. Try this...

    Code:
    console.log("Hamburgers".substring(3,9));

    0 Not allowed! Not allowed!


  3. #3
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default

    Everything is right except for the stupid hamburgers one..

    Thanks cold..

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  4. #4
    Member Silas's Avatar
    Join Date
    Jan 2013
    Posts
    59
    Points
    94
         User Info     Contact     Gamer ID
    Join Date
    Jan 2013
    Posts
    59
    Points
    94

    Default

    Javascript != Java

    They are entirely separate languages. You are doing javascript.

    To get burgers out of hamburgers you have to do
    Code:
    console.log("Hamburgers".substring(3,10));

    0 Not allowed! Not allowed!
    Last edited by Silas; 06-05-2013 at 06:13 AM.

  5. #5
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default

    Came across another problem: http://prntscr.com/18hsk5

    It wants me to define userAnswer, but I don't know where.

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  6. #6
    Member Silas's Avatar
    Join Date
    Jan 2013
    Posts
    59
    Points
    94
         User Info     Contact     Gamer ID
    Join Date
    Jan 2013
    Posts
    59
    Points
    94

    Default

    Quote Originally Posted by Outlaw View Post
    Came across another problem: http://prntscr.com/18hsk5

    It wants me to define userAnswer, but I don't know where.
    With the second prompt "Are you feeling lucky punk"

    0 Not allowed! Not allowed!

  7. #7
    Wii U Section Moderator
    Computer Engineer
    MrOwnership's Avatar

    Badge

    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    1,435
    Points
    2,862
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    1,435
    Points
    2,862
    Gamer IDs

    Steam ID: MrOwnership Wii Code: MrOwnership

    Default

    Try replacing prompt("Are you feeling lucky punk?");
    with var userAnswer = prompt("Are you feeling lucky punk?");

    0 Not allowed! Not allowed!

  8. #8
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default

    Quote Originally Posted by Silas View Post
    After the second prompt "Are you feeling lucky punk"
    How would I define it?

    userAnswer == yes?

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  9. #9
    Member Silas's Avatar
    Join Date
    Jan 2013
    Posts
    59
    Points
    94
         User Info     Contact     Gamer ID
    Join Date
    Jan 2013
    Posts
    59
    Points
    94

    Default

    Quote Originally Posted by MrOwnership View Post
    Try replacing prompt("Are you feeling lucky punk?");
    with var userAnswer = prompt("Are you feeling lucky punk?");
    We have a winner.

    0 Not allowed! Not allowed!

  10. #10
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default

    Quote Originally Posted by Silas View Post
    We have a winner.
    NVM. I got yes defined.

    0 Not allowed! Not allowed!
    Last edited by Outlaw; 06-05-2013 at 05:21 PM.
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 06:18 PM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.