什么是 JavaScript 按位非 (~) 运算符?
htmljavascriptprogramming scripts更新于 2026/1/10 10:52:17
按位非 (~) 运算符对位执行非运算。您可以尝试运行以下代码来了解如何使用 JavaScript 按位非运算符。
示例
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Bitwise NOT Operator<br>");
// 7 = 00000000000000000000000000000111
document.write(~7);
</script>
</body>
</html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

