In js, there is one equals sign, two equals signs, three equals signs, one is a value equals sign, and the other is a comparison equals sign. So what is the use of the three equals signs, next, I will introduce three equal signs.
Sometimes we can
An equal sign is the function of assigning values. The main problem is the difference between two and three equal signs. Many friends may not know it, there is a good example in this article, which mainly describes the differences between the two.
Equals () reflects the specific value of an object or variable, which is the value contained within two objects-either a reference to an object or a value of a value type.Hashcode () is a hash value that is computed by the object or variable through
1 Why should you judge?Some students may see this title will be puzzled, why we have to determine whether the two variables in JavaScript is equal, JavaScript is not already provided with the double equals "= =" and the three equals "= = =" To us
An equal sign is a value assignment. The main problem is the difference between two and three equal signs.The difference between two equal signs and three equal signs in javaScriptIn a word: = convert the type before comparison, = first judge the
First, let's give a brief introduction to give you an intuitive understanding.
= Equality === identity equality
= When the value types on both sides are different, type conversion should be performed first and then comparison should be made.===
Determine whether two variables are equalProgramVery important computation in design. This operation is quite simple when processing the original value, but it is a little complicated to design the object. Javascript provides two sets of operators
Differences between = and = in js (two equal signs and three equal signs) and js equal signs 1. for basic types such as string and number, ==and ===are different1) compare different types, = to compare "convert to the value of the same type" to see
I. The role of JavaScript "= ="
1. When the content on either side of = = is a string, the contents of the string are compared to equal.2. When the content on both sides of = = is a number, compare the size of the number is equal.3. When the
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.