html-output (1) (2)
html-output (1) (2)
<script>
<script>
function play(playerChoice)
function {
play(playerChoice) {
const const
choiceschoices
= [rock’, paper’,'paper',
= ['rock', 'scissors];
'scissors'];
const const
computerChoice = choices[Math.floor(Math.random()
computerChoice * choices.length)];
= choices[Math.floor(Math.random() * choices.length)];
document.getElementByld (‘computer-choice).textContent = computerChoice;
document.getElementById('computer-choice').textContent = computerChoice;