它对其整数参数的每一位执行布尔或运算。
您可以尝试运行以下代码,以了解如何使用按位或运算符(|)-
<html>
<body>
<script>
var a = 2; // Bit presentation 10
var b = 3; // Bit presentation 11
document.write("(a | b) => ");
result = (a | b);
document.write(result);
</script>
</body>
</html>