Hướng dẫn thử thách
1 / 6
Step 1
The first step is to build out the function that will generate a random choice for the computer.
The `getRandomComputerResult` function will be used to get the computer's choice. Inside that function, you should see an `options` array with `"Rock"`, `"Paper"`, and `"Scissors"`.
Your task is to complete the `getRandomComputerResult` function so that it returns a random option from the `options` array.
**Tips**
- You can use `Math.random()` and `Math.floor()` to help you get a random whole number. This will represent the index number for the `options` array.
- You can use the random index to access the option from the `options` array.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.html
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵