2013-09-08 2 views
2

저는 Codeacademy.com에서 일하고 있습니다. 콘솔에서 전달하지 않습니다. 나는 그들에게 연락을했지만, 누군가 내 코드에 문제가있는 것을 본 적이 있습니까?CodeCademy 콘솔이 고장 났습니까?

섹션 4/7, 문제점 5. "이야기가 뜨겁다."

링크 된 튜토리얼
console.log("Batman glares at you."); 
var userAnswer = prompt("Are you feeling lucky, punk!?", ""); 
if(userAnswer.toLowerCase() === "yes"){ 
    console.log("Batman hits you very hard"); 
} 
else{ 
    console.log("You did not say yes to feeling lucky."); 
} 

: http://www.codecademy.com/courses/javascript-beginner-en-x9DnD/0/5?curriculum_id=506324b3a7dffd00020bf661#

+0

나에게 좋아 보이는 시도 - http://jsfiddle.net/5Bm8z/가 - 당신은 어떤 브라우저를 사용하고 있습니까? – Sergio

+0

Chrome 및 FF에서 테스트했습니다. – ryanjohnsond

+0

콘솔에서 텍스트를 가져올 수 없다는 뜻입니까? 당신은 바이올린에서 그것을 얻습니까? – Sergio

답변

2


//Check if the user is ready to play! 
confirm("Are you ready?"); 

var age=prompt("How old are you?"); 

if (age>17){ 
console.log("play on"); 
} 
else 
{ 
console.log("i don't care"); 
} 
//Story 
console.log("Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him."); 
console.log("Batman glares at you"); 

var userAnswer; 
var userAnswer=prompt; 
prompt("are you feeling lucky?"); 
if (prompt==="yes") 
console.log("Batman hits you very hard. It's Batman and you're you! Of course Batman wins!"); 
else 
console.log("You did not say yes to feeling lucky. Good choice! You are a winner in the game of not getting beaten up by Batman."); 
+1

정답입니다. 이 연습은 이전 연습이 포함 된 경우에만 작동합니다. – ben

관련 문제