A community for students.
Here's the question you clicked on:
 0 viewing
Zyi6
 one year ago
JavaScript Help!!!
Can someone help me out with if/else statements?
Zyi6
 one year ago
JavaScript Help!!! Can someone help me out with if/else statements?

This Question is Closed

Zyi6
 one year ago
Best ResponseYou've already chosen the best response.0@dan815 @iambatman @Nnesha

Zyi6
 one year ago
Best ResponseYou've already chosen the best response.0I am trying to create a simple game of rock paper scissors. Can someone help?

tester97
 one year ago
Best ResponseYou've already chosen the best response.0No Offense, But this is so easy to do. 5 Year old could read a book and do this. Why are you taking a java course if you can't make a simple Rock, paper, and scissor game?

Zyi6
 one year ago
Best ResponseYou've already chosen the best response.0@Tester97, I am not taking a course. This is more of a hobby. I don't care if a 5 year old could do it, the point is that I'M the one that needs help. Now please, Help, or leave. @Jaynator495 , Will you help?

tester97
 one year ago
Best ResponseYou've already chosen the best response.0Zyi6, First off, if this was a hobby. You wouldn't be on a site that is poorly ran, and 80% of these people know nothing about programming. You are best off going to a real forum, and getting help.

Jaynator495
 one year ago
Best ResponseYou've already chosen the best response.2Would you like this done through the js console, through a text box, or through a prompt and yes it is very easy _

Zyi6
 one year ago
Best ResponseYou've already chosen the best response.0As of right now, I know that I need to start by declaring a function with 3 parameters, for rock, paper, and scissors, correct?

tester97
 one year ago
Best ResponseYou've already chosen the best response.0var options = ["paper", "rock", "scissors"], result = [" ties ", " beats ", " loses to "], i = Math.floor(Math.random() * 3), randomChoice = options[i]

Jaynator495
 one year ago
Best ResponseYou've already chosen the best response.2^you forgot some things there, like what loses/wins/ties... and also the input XD

Zyi6
 one year ago
Best ResponseYou've already chosen the best response.0var options = function (rock, paper, scissors) {} Does that look like the correct starting point?

tester97
 one year ago
Best ResponseYou've already chosen the best response.0Jay, I wasn't finish.

tester97
 one year ago
Best ResponseYou've already chosen the best response.0I just wanted to know if she could build off of that.

Zyi6
 one year ago
Best ResponseYou've already chosen the best response.0I am a he, thank you very much.

Jaynator495
 one year ago
Best ResponseYou've already chosen the best response.2^Oo i didn't know about that website... *instantly bookmarks website*

woodrow73
 one year ago
Best ResponseYou've already chosen the best response.1There are many ways to go about the same project  I find first making the algorithm then diving into the code works quite well. I'm not well versed in JS, but for rocks paper scissors (rps) I'd say ``` 1. user inputs their choice of r, p, or s 2. computer randomly picks it's choice 3. a function is called that takes the user's and computer's picks, and it figures out if user wins, loses, or it's a draw 4. result is displayed to the user ```
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.