Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

How to compare the boolean type in the javascript?

Hello.

I want to know how to compare the boolean tpye array in the javascript.

For example, 

var arr1 = [1, 1, 0, 0, 1, 1, 1, 1];
var arr2 = [1, 1, 1, 0, 0, 0, 1, 1];

so, I want to compare arr1 and arr2. then, arr3 is [1, 1, 0, 0, 0, 0, 1, 1].

The true value in the arr1 and in the arr2 is arr3's true value.

How to construct the function in the javascript?


0 Answer
Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.