This forum is now read-only. Please use our new forums! Go to forums
Help on JavaScript question 3/9
I wrote the cod right but it keeps saying that I need to remember to log computerChoice can anyone help, here is what I have so far var userChoice = prompt(“Do you choose rock, paper or scissors?”); var computerChoice = Math.random();
plz help
Answer 5520ebce9376766a0300051b
If it says you forgot to log computerchoice then that is what you have to do. Add the following line of code at the end of your program:
console.log(computerChoice);
This line of code will show the content of the variable “computerChoice” in the console.
Answer 55262ac4e39efe40ff0001bc
It should work. Your 2 lines of code + my addition should give you this code which made me pass exercise 3/9:
var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
console.log(computerChoice);
You could try to refresh/reload the website with F5 and run the code again or use a different browser for codecademy and see if it works then.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
is there anything else because it is still not working