什么是 JavaScript 按位左移 (<<) 运算符?
htmljavascriptprogramming scripts更新于 2025/3/3 17:48:17
使用按位左移运算符,从右侧移位一个或多个零位。不考虑最左边的位。
示例
您可以尝试运行以下代码来了解如何使用 JavaScript 按位左移运算符。
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Bitwise Left Shift Operator<br>");
// 7 = 00000000000000000000000000000111
document.write(7<<1);
</script>
</body>
</html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

