ตัวดำเนินการ Bitwise NOT (~) ไม่ทำงานบนบิต คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อเรียนรู้วิธีทำงานกับ JavaScript Bitwise NOT Operator
ตัวอย่าง
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Bitwise NOT Operator<br>");
// 7 = 00000000000000000000000000000111
document.write(~7);
</script>
</body>
</html>