字符串不是函数错误?

Dan*_*ndy 1 javascript string

背景

我正在使用Code Academy学习JavaScript,并且我遇到了他们设置的任务之一.他们提供的控制台没有提供错误输入行的指导.它提供的唯一帮助是错误消息.

我收到此错误消息

TypeError:string不是函数

来自这个JavaScript块

confirm("Are you ready to play?");
var age = prompt("what is your age?");

if(age > 13){
    console.log("You are allowed to play but we hold no responsiblity");
}else{
    console.log("You can play, crack on");
}

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");

console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'"); 
var userAnswer = prompt("Do you want to race Bieber on stage?");

if (userAnswer === "yes"){
    console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
}else{
    console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}

var feedback = prompt("Rate this game out of 10 bitch!");

if (feedback > 7){
    console.log("Thank you! We should race at the next concert!");
}else{

      console.log("Ill keep practicing coding and racing.");
}
Run Code Online (Sandbox Code Playgroud)

知道这个错误来自哪里会有很大的帮助.

编辑

在进行各种用户建议的更改后,代码仍然标记为不正确,错误消息仍然存在.

有关脚本何时退出的详细信息

脚本在提示后退出:

"你几岁"?

VPK*_*VPK 7

错字,

 console.log="You and Bieber start racing. It's neck and neck! You win by a shoelace!";
Run Code Online (Sandbox Code Playgroud)

放括号.

console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
Run Code Online (Sandbox Code Playgroud)