#!/bin/sh
//Rock, Paper, Scissors
var myChoice = prompt("Rock, Paper, or Scissors?");
var computerChoice = Math.random();
if (computerChoice >= 0 && computerChoice <= .33)
{
computerChoice === "rock";
}
else if (computerChoice >=.34 && computerChoice <= .67)
{
computerChoice === "paper";
}
else
{
computerChoice === "scissors";
};
我理解我的代码是初级的,但我只是从 Javacript 开始。我正在尝试通过终端运行此代码并继续收到错误消息“找不到变量:提示”。我确信那里有一个简单的解释,但我似乎找不到它。