Can someone tell me why the greater or less signs (›,‹) aren't working for me?


#1


Replace this line with your code.


#2

No idea. Could you provide some information, like your code a link to the exercise an in detail description what happened. All with your question in the text field and not in the tittle (at least if you're adding full sentences there)?


#3

In any question that requires an if/else statement (for example in the 'code your own adventure ' task) you have to put in : if the players age is over 13, than console.log this, or if the age is less than 13 console.log that statement. And if I put
if(age › 13){
console.log("something");
}
it's not working. Always have to put this to past the exercise:
if(age === 13){
console.log("something");
}
only the '=' sign works for me.
I copy the whole code of the exercise:confirm("I am ready to play");
var age = prompt("What's your age?");
if(age › 13)
{
console.log("You are allowed to play, but I take no responsibility");
}
else {
console.log("Keep playing");
}

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 Ican race without pacing.'");
}

var feedback = prompt("Rate my game out of 10!");
if(feedback › 8)
{
console.log("Thank you! We should race at the next concert!");
}
else{
console.log("I'll keep practicing coding and racing");
}


#4

thanks for your help in advance:)


#5

Try eliminating the spaces between your variables, the comparison operator and the input.

For example:
if (age > 13){

should be

if (age>13){


#6

Your < and > operators actually do not look like the regular ascii ones (60 and 62):
› in comparison to >. Can you copy these operators from somewhere?


#7

YEAH!!! that was the problem!! Thanks so much!!!


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.