I am new to Javascrript. I have a variable that has the following data:
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 the key has a NULL value. How can i do this?
Sahil source share