JSFiddle - React, Tailwind, and code Playground

by Ricardo Pontual

JavaScript

let n1 = 1; // 00000001
let n2 = 2; // 00000010
let n3 = 3; // 00000011

  
  
let n1 = 1; // 00000001
let n2 = 2; // 00000010  
  
bitwise or |   00000011 = 3
bitwise and &  00000000 = 0


let n2 = 2; // 00000010
let n3 = 3; // 00000011
  
bitwise or |   00000011 = 3   
bitwise and &  00000010 = 2


// Bitwise or  |
// Bitwise and &