I write this code..
let str ="apple";
if(str[0]==="a" && str.lenght > 3){
console.log("good string");
} else{
console.log("not a good string");
}
Both values are true but it return false value and print else statement.
Both values are true,i think it prints the if statement but it prints the else statement in every situation.
New contributor
Tuba imtiyaz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1