|
| 14 Aug 2014 12:47 AM |
Finally I finished coding a JavaScript Rock Paper Scissors game!
Jesus that took a while.
var userChoice = prompt("Do you choose rock, paper or scissors?"); var computerChoice = Math.random(); if (computerChoice < 0.34) { computerChoice = "rock"; } else if(computerChoice <= 0.67) { computerChoice = "paper"; } else { computerChoice = "scissors"; } console.log("Computer: " + computerChoice);
var compare = function(choice1, choice2) { if (choice1 === choice2) { return "The result is a tie!"; } if (choice1 === "rock") { if (choice2 === "scissors") { return "rock wins"; } else { return "paper wins"; } } if (choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else { return "scissors wins"; } } if (choice1 === "scissors") { if (choice2 === "paper") { return "scissors wins"; } else { return "rock wins"; } } }
compare(userChoice,computerChoice)
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
ebenton95
|
  |
| Joined: 06 Nov 2011 |
| Total Posts: 9671 |
|
|
| 14 Aug 2014 12:51 AM |
| what percentage of the course are you through? |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 12:52 AM |
27
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
ebenton95
|
  |
| Joined: 06 Nov 2011 |
| Total Posts: 9671 |
|
|
| 14 Aug 2014 12:54 AM |
o ok, im around 60%
I guess you're going into for loops? That was probably the trickiest part of this for me so far. |
|
|
| Report Abuse |
|
|
BasedFox
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 24373 |
|
|
| 14 Aug 2014 01:00 AM |
| Yeah I gotta get back to Codecademy. |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 01:01 AM |
Yeah, I'm gonna start it tomorrow.
I pretty much did that whole section of functions and rock paper scissors today lol.
I might start C# and/or PHP
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
BasedFox
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 24373 |
|
|
| 14 Aug 2014 01:02 AM |
| I finished the HTML section. |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 01:04 AM |
I just did the basics of HTML, but I never finished it.
I took a break for like a month, then went to Java.
I got to get back to HTML tbh... (pretty simple though)
There is so many languages to learn lol..
But, I'm not really looking forward to Ruby and jQuery as much as the others.
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
bookface6
|
  |
| Joined: 24 Dec 2010 |
| Total Posts: 18470 |
|
|
| 14 Aug 2014 06:41 AM |
I'm starting Codeacademy in a few days.
"It's not about the name on the jersey, it's about the badge on the front." ~ David Beckham |
|
|
| Report Abuse |
|
|
BMLGUY
|
  |
| Joined: 20 Jul 2011 |
| Total Posts: 36711 |
|
|
| 14 Aug 2014 06:44 AM |
| I've done HTML + CSS and I'm working on Javascript |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Aug 2014 11:33 PM |
bump
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
nomerdude
|
  |
| Joined: 30 Jan 2009 |
| Total Posts: 8202 |
|
|
| 14 Aug 2014 11:58 PM |
| i rq on 5/7 cause donny couldnt help me |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 11:59 PM |
I will help you. What category is it?
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
IcyFires
|
  |
| Joined: 29 Jun 2013 |
| Total Posts: 5046 |
|
|
| 15 Aug 2014 12:01 AM |
eww javascript you should rig it so they always lose
http://www.roblox.com/--item?id=171600495 |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2014 12:03 AM |
ikr icy
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
padam11
|
  |
| Joined: 11 Feb 2013 |
| Total Posts: 15774 |
|
|
| 15 Aug 2014 12:11 AM |
is codecademy good?
"Never wrestle with pigs. You both get dirty and the pig likes it." |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2014 12:11 AM |
Yeah, it's really good.
I'd reccommend HTML as your first language, as it is used in EVERY website and you need to know it to perform PHP.
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
padam11
|
  |
| Joined: 11 Feb 2013 |
| Total Posts: 15774 |
|
|
| 15 Aug 2014 12:12 AM |
yeah, i'm thinking of html and then probably c# or php
"Never wrestle with pigs. You both get dirty and the pig likes it." |
|
|
| Report Abuse |
|
|
IcyFires
|
  |
| Joined: 29 Jun 2013 |
| Total Posts: 5046 |
|
|
| 15 Aug 2014 12:17 AM |
HTML is the easiest language ever. I became fluent in it in like 23 hours after I started a book.
http://www.roblox.com/--item?id=171600495 |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2014 12:28 AM |
I am 37% done now with JavaScript.
Darksideadmin {Check out the ISL website! @BabyFacedAssasin on Ro-Twitter} |
|
|
| Report Abuse |
|
|
nomerdude
|
  |
| Joined: 30 Jan 2009 |
| Total Posts: 8202 |
|
|
| 15 Aug 2014 02:13 PM |
| im far ahead of u just get to the 5/7 thats hard |
|
|
| Report Abuse |
|
|