/    Sign up×
Community /Pin to ProfileBookmark

Correct my script(very easy to correct total beginner)

// Check if the user is ready to play!
confirm(“I am ready to play!”);
var age=prompt(“What is your age?”)
if (age<13){
console.log(“GET ****ING OUT OF HERE”)}
else
console.log(“Welcome player!”)
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.'”)
there is an error i think it is the var can you tell me the error

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumSep 27.2015 — The error is in this line:

console.log("GET ****ING OUT OF HERE")[B]}[/B]

Familiarise yourself with the console, it shows you such errors.
×

Success!

Help @joelmappa spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...