I am newbie in Javascrript. I have a variable having following details:
var result = false;
[{"a": "1","b": null},{"a": "2","b": 5}].forEach(function(call){
console.log(call);
var a = call['a'];
var b = call['b'];
if(a == null || b == null){
result = false
break;
}
});
I want to break the loop if there is NULL value for a key. How can I do it?
for (var i = 0...
etc, a literal.forEach
or what? – VLAZ Oct 5 '16 at 20:12break;
inside of the forloop inside of the if statement that checks for the NULL value. – Nicholas Siegmundt Oct 5 '16 at 20:12