Toán tử Bitwise NOT (~) thực hiện thao tác NOT trên các bit. Bạn có thể thử chạy mã sau để tìm hiểu cách làm việc với JavaScript Bitwise NOT Operator.
Ví dụ
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Bitwise NOT Operator<br>");
// 7 = 00000000000000000000000000000111
document.write(~7);
</script>
</body>
</html>