ReferenceError: variable is not defined (but defined)

ReferenceError: variable is not defined (but defined)

控制台说:"ReferenceError: tpyeRand is not defined"(在第 "else if" 行)

var type;
var typeRand = Math.random();
typeRand = 0.5;
alert(typeRand);
if(typeRand < 0.7) {
  type = "calm";
}
else if(tpyeRand < 0.9) {
  type = "fuzzy";
}
else {
  type = "angry";
}

您刚刚在该行拼错了单词 "typeRand"。