Can someone help me with expressing in JavaScript that if both array1[i] and array2[j] equal either "0", "O" or "Q", then array1[i] should be equal to array2[j? I've tried different approaches but it's not working. Thank you.
if ((array1[i] == "0" || array1[i] == "O" || array1[i] == "Q") && (array2[j] == "0" || array2[j] == "O" || array2[j] == "Q")){
array1[i] = array2[j];
}
or
if ((array1[i] == "0" || array1[i] == "O" || array1[i] == "Q") && (array2[j] == "0" || array2[j] == "O" || array2[j] == "Q")){
array1[i] = array2[j];
}