My code pls help i don"t get it

javascript

#1

prompt("write a text");
if (prompt.length > 6)
{
console.log("this is to long")
}
else
{
console.log("great")
}


#2

Do you want someone to fix it for you or would you rather have help with whatever is preventing you from doing it yourself?

Because if it's the latter, then you'll have to explain what that is.


#5

Don't forget the semicolons at the end for the console.log() statements.


#6

Are you trying to say:

var p = prompt("write a text");
if (p.length > 6)
{
console.log("this is to long")
}
else
{
console.log("great")
}

You need to store the response to a variable