var someValue1 = '${requestScope.someValue}';
var someValue = '${requestScope.someValue}';
var someValue = '${requestScope.someValue}';
if(someValue1 !== null && someValue1 !== undefined && someValue1 !== '' && someValue1!=='null'){
alert('Your New someValue1 = '+someValue1);
};
if(someValue !== null && someValue !== undefined && someValue !== '' && someValue!=='null' ){
alert('Error : ' + someValue +"\nDescription : " + someValue);
};
i want to execute only one alert box depending on the values but null checking is not working.
My both alert boxes are getting executed and that is my main problem. i cant understand why.
'{$requestScope.someValue}'string literals in some way? Because in your code above, you have the actual string'{$requestScope.someValue}'.var someValue = 'foo';. The value you're checking is the actual string'{$requestScope.someValue}.