# 3. Math.Random HELP

#1

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

```

Replace this line with your code.

``<do not remove the three backticks above>``

#2

var userChoice = prompt(â€śDo you want rock paper or scissors?â€ť)
var computarChoice = Math.random();

#3

what goes in the parentheses

#4

Nothing goes in the parentheses.

#5

then why wont it work

#6

SO ANNOYING
-Heammawihio

#7

@heammawihio,
######Have a close look at
#computarChoice
######required is computerChoice

#8

The Math.random() method will deliver a number with a value
in the range of 0_(included)_ upontill 0.9999_(1 excluded)_.

As you will have to divide the number range form 0_(inclusive)_ to 0,9999_(so 1 excluded)_
into 3 equal partitions
we have to use an if else-if else statement.
The if else-if else skeleton looks like:

``````    if (conditionA) {
//conditionA is true
} else if (conditionB) {
//conditionA is false
//conditionB is true
} else {     // <=== !! Takes NO condition-statements !!
//conditionA is false
//conditionB is false
}
``````

following the Instructions the conditions would be:

1. If computerChoice is between 0 and 0.33, make computerChoice equal to â€śrockâ€ť.
( 0 <= computerChoice && computerChoice <= 0.33) which we capture at the IF using
( computerChoice <= 0.33)

2. If computerChoice is between 0.34 and 0.66, make computerChoice equal to â€śpaperâ€ť.
( 0.33 < computerChoice && computerChoice < 0.67) which we capture at the ELSE IF as
( computerChoice < 0.67 )

3. If computerChoice is between 0.67 and 1, make computerChoice equal to â€śscissorsâ€ť.
( 0.67 <= computerChoice && computerChoice < 1) , you reached the ELSE level
you can asume that computerChoice is greater equal to 0.67,
the ELSE does NOT take a condition, just write your code.

#9

Thank you so much you really will help meâ€¦ but for number 4. and Iâ€™m stuck on three, I donâ€™t know what it means by, "Did you remember to log computerCoice tothe console
and thanks again for helping me with my misspelling, that would have taken me forever to find.

#10

var userChoice = prompt(â€śDo you want rock paper or scissors?â€ť)
var computarChoice = Math.random();
console.log()

What goes in console.log and Math.random

#11

With

``````var computerChoice = Math.random();
``````

you have created a so-called variable computerChoice
and with a `=` sign you are assigning a **number Value to this computerChoice variable.
This number Value is the =result= of calling the Math.random() Method.
( in Javascript the Math.random() Method does NOT take any argumentâ€™s )

The console.log() method will Display any argument you give it.
like for instance the computerChoice variable

``````console.log( computerChoice );
``````

#12

Thank you so much, my computer was deleting my coding? strange Thanks again!

#13

and thanks for your previous post too!

#14

computER not computAR