28. Conclusion Part 2


#1


// Not sure where to begin? Check the Hint!
var myName = "Hassan";

if  (var (myName.length > 5) {
    console.log  ("See you later");    
}

else{
    console.log ("Come in");   
}


#2

this line:

if  (var (myName.length > 5)

why do you use a var keyword? var is for declaring variables

the number of opening parentheses ( doesn't match the number of closing parentheses )


#3

I'm not sure what your question is but I'm assuming you have a syntax error.

var myName = "Hassan";

if  (var (myName.length > 5) { // change to: if (myName.length > 5) {
    console.log  ("See you later");    
}

else{
    console.log ("Come in");   
}

The condition in your 'if' statement isn't right. There is no need to include 'var' since the variable is already defined. Also, you have an extra (. See my comment for the correct syntax.


#4

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