Discover javascript shift operator, include the articles, news, trends, analysis and practical advice about javascript shift operator on alibabacloud.com
The arithmetic right shift and logical right shift of negative numbers in JavaScript are very confusing, especially the logical right shift >>>, you will find that even a very small negative number, after the right shift, will also get a huge
Javascript bitwise left shift operator (
This article mainly introduces the Javascript bitwise left shift operator (
Bitwise left shift operator (
Left shift expression bit.
Result = expression1
Parameters
Result
Any variable.
Expression1
Operator
JavaScript has assignments, comparisons, arithmetic, bits, logic, strings, and special operators. This chapter describes the operators and some information about operator precedence.Table 2.1 A concise list of all the JavaScript
The push () function is used to add one or more elements to the current array and return the new array length. The new element will be added to the end of the array in turn.This function belongs to the array object and is supported by all major
Bitwise left-shift operator (The bit of the left-shift expression.
result = expression1
ParametersResult
Any variable.
Expression1
Any expression.
Expression2
Any expression.
DescriptionThe
var temptemp = The value of the variable temp is
This article mainly describes the JavaScript bitwise LEFT operator (The bitwise Left operator (<<) shifts the bit of the expression to the left. result = expression1 << expression2 parameter result any variable. Expression1 of any expression.
Today in the work in JS see >>> Such a thing do not know and have not seen in other places.Check the data on the Internet to know this is an operator called the unsigned Right shift operator, the name is very long also difficult to understand, is
Speaking of operators, basically all kinds of programming languages will be involved, the use of similar methods. Here's a simple collation of JavaScript here today.
In general, operators are still relatively much more, can be divided into the
Front.
Bitwise operators are very low-level operations and are not commonly used because they are not intuitive. However, its speed is very fast, and reasonable use can achieve very good results. This article will introduce the operator-bitwise
The JavaScript scripting language describes a set of operators for manipulating data values, including unary operators, Boolean operators, arithmetic operators, relational operators, ternary operators, bitwise operators, and assignment operators.An
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.