My code pls help i don"t get it

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

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.

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

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