This might seems silly, but I'm trying it from long time.
var parentArray = [
[0.49988811188811194, 0.17249417249417248],
[0.8181398601398602, null],
[0.8181398601398602, 0.47785547785547783],
[0.49988811188811194, 0.47785547785547783]
];
function containsNull(arr) {
return (function() {
return arr.filter(e => {
if(e.some(el => el == null)) return true
})
})();
}
console.log("-->", containsNull(parentArray))
here I'm getting output as
> "-->" Array [Array [0.8181398601398602, null]]
but I don't need the array as return value. I just want true or false that's all.
i.e,
"-->" true
How to achieve this? even using load-ash library is good to go!
return array.includes(null) === true)