Well it’s not realy causing any errors. Anyways i’m sending ajax request and getting back just some text then i split that text in array and finaly i just wanna do some checking so let’s say this is how i do it:
var response = data.split("&&", 3); // here is my response and i split it by every &&
//now i wanna do some cheking if response isn't false
if(response[0] != 'false'){
alert('it\'s not false');
}
And it always says that it’s not false even thou it is, i’ve tried to alert(response[0]) and i get false (btw it’s just a string of text)
And i didn’t include my full code here because it would make to much confusion, but i know it can’t be error anywhere else since when i try to alert my response[0] i get false .
As others have pointed out in the comments, you seem to have spaces in the value that you’re comparing to
false. Try this: