/    Sign up×
Community /Pin to ProfileBookmark

need help with debugging some java script plz help

<html>
<head>
<script type=”text/javascript”>
function Upstairs() {
document.write (“<p>Upstairs there is a bunch of rooms you do not know where the key is</p>”)
answer=prompt (“which room should you go in “10” or “12”>?”)

if (answer==”10″) {
Ten()

}else{
Twelve()
}
}

function Downstairs() {
document.write (“<p>You are still downstairs but which room you should you go in?</p>”)
answer=prompt (“To the “kitchen” or to the “bathroom”?”)
if (answer==”kitchen”) {
Kitchen()
}else{
Bathroom()
}

}
</script>
</head>

<body bgcolor=”#000000″ text=”silver” >
<script type=”text/javascript”>
document.write (“<h2>The grand old story</h2><p>You are in a dark scary house, you can go upstairs where it is dark or downstairs which is still dark, but rememeber you need to find the key to the house to get out.</p>”)
answer=prompt (“Do you want to go “upstairs” or stay “downstairs”)
if (answer==”upstairs”) {
Upstairs()
}else{
Downstairs()
}

</script>
</body>
</html>

[upl-file uuid=4a071953-fe48-428c-bf0d-a607b73c3daf size=1kB]java.txt[/upl-file]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@redhatlookMay 28.2007 — there is a missing quote here

answer=prompt ("Do you want to go "upstairs" or stay "downstairs"[COLOR="Red"]"[/COLOR])
[/QUOTE]
×

Success!

Help @happyface_625 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...