Answer the question
In order to leave comments, you need to log in
2 variables are not equal to each other (Both with the same value) how is this possible?
Hello everyone, I have such a problem, there is a function, there is a check in it, there is 1 variable that stores the entered user data, and there is a second one that searches for the service from this data, and so there is a problem that now it just does not work ( everything is ok with other data) I have already watched the lines for a long time, and this way and that. 0 profit.
here is the code
CheckNewProduct: function () {
if ($(child).val() == "") {
return true;
}
var isExists = false;
var value = $(child).val().toUpperCase(); // тут у нас value = BLA BLA BLA
for (var i = 0; i < keyArray.length; i++) { // тут keyArray=66(внутри данные по 66 продуктам допустим, наш 66й)
var arrValue = keyArray[i].toUpperCase(); // тут arrValue = BLA BLA BLA
if (arrValue == value) { // Получается false и ничего не сделать
Answer the question
In order to leave comments, you need to log in
Perhaps "BLA BLA BLA" is really not equal, the characters are different, for example ,
try to check on simple values
, here is an example, maybe it will help
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question