Whats the result here?

var testVar = true;
var isValid = "true";
var isValue = false;

if (testVar === isValid) {
 alert("Yes!");
} else if (testVar == isValid) {
 alert("Somewhat...");
} else {
 alert("No!");
}

@mache

Change your quote mark to a English font - and if you are sure that you are using English font then I would suggest write it directly in a code editor other than copy and paste from elsewhere or you can directly copy the quote mark from here " " . Then see the output.

Moreover, if this is your full code and nothing else, remove the alert() and use console.log() to see the result.

Hope this will help you.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

Please use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.

markdown_Forums


@thetradecoder code is now formatted properly if you want to give second feedback

For this code to generate output, you have to either put your current code into a website like https://repl.it/ or change all your alert into console.log and run it through an IDE.