March 23rd, 2024
What's missing in this code?
function getFalseIndexes(arr)
return arr
.map((value, index) => ({ value, index}))
.filter(({ value }) => !value)
;
}
getFalseIndexes([true, false, true, false]); // [1, 3]
getFalseIndexes([true, true, true, true]); // []
Type or select from these options