I am experimenting with JavaScript conditions. In the code below, why is my first condition not returning true while the second one does?
Javascript:
arr = [1,2,3];
if (arr[0] !== (1 || 2)){console.log('true')}
//undefined
if (arr[0] !== (2 || 1)){console.log('true')}
//true