I have two arrays defined as follows,
var first = [true, false, true, false];
var second = [true, true, false, false];
I need the output as [true, false, false, false]
e.g. logically AND each index values from the arrays one by one and display output.
How can I do this with ES6 methods?
var third = [true, false]. More serioulsy, why should the output be like that? You didn't specify how this algorithm should work.var first = [true, false, true, false];andvar second = [true, true, false, false];and the add the extra info to the expected output. That will stop the uncertainty and bickering.