Data typeBefore introducing symbol, let's briefly describe the JavaScript data type:JavaScript has 6 data types, namely:
string literal type
Number numeric type
Object type
Boolean Boolean value type
Null empty value
C ++ Operator Overloading and Operator Overloading
The operation objects of pre-defined operators in C ++ can only be basic data types. However, similar operations are also required for many user-defined types (such as classes. In this case, you
Operator overloading
The so-called overloading, is to re-give new meaning. A function overload is a function that assigns a new meaning to an existing function, enabling it to implement new functionality, so that a function name can be used to
SymbolOverview as symbol instance of property name: Eliminates the traversal of the Magic string property name Symbol.for (), Symbol.keyfor () instance: the Symbol value built into the module's Singleton mode
Overview
ES5 object property names are
ES5 object property names are strings, which can easily cause property names to conflict. For example, if you use an object provided by another person but want to add a new method to the object (mixin mode), the name of the new method may conflict
In Javascript ES6, the use of the data type Symbol is described in detail.
Introduction
Symbol is a special and unchangeable data type. It can be used as an identifier of an object property to indicate unique values. The Symbol object is an implicit
What is Symbol?
Symbols is not an icon, nor does it mean that you can use a small picture in your code:
Nor does it refer to the grammar of other things. So, what exactly is Symbol to?Seven types of data
When JavaScript was normalized in 1997,
An operator is a particular symbol or expression used to examine, modify, or merge variables. For example, with the sum operator + you can sum two digits (such as let i = 1 + 2); a slightly more complex example has logic and operator && (e.g. if
! The operator performs a logical "Non" Operation on the expression.! = The operator compares the values of two expressions to see if they are equal.! = The operator compares the values of two expressions to see if they are not equal or the data
A macro resembles a function in C, executes after the specified parameter is passed in, and inside the macro can contain the data step program and the conditional operation symbol.A macro variable is just a small variable 、、、、 (by the same is a
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.