دسته بندی عبارت و عمل ها
لیست زیر براساس الفابت انگلیسی مرتب شده است
عبارات اصلی
عبارت عمومی و کلمات کلیدی اصلی در جاوا اسکریپت.
this- کلمه کلیدی
thisبه محتوایی در درون تابعی که در آن نوشته شده است اشاره می کند. function- کلمه کلیدی
function٫ تعریف کننده یک تابع است. class- کلمه کلیدی
class٫ تعریف کننده یک کلاس است. function*- کلمه کلیدی
function*تعریف کننده یک سازنده کلاس است. yield- مکث و از سرگیری می کند تابعی که تولید شده است.
yield*- محول می کند به تابع یا آبجکت تولید شده دیگر.
-
async function* async functionیک تابع async تعریف می کند-
await - مکث و از سرگیری می کند و تابع اسینک (async ) و منتظر اجازه برای تایید را رد می ماند
[]- تعریف کننده /سازنده یک آرایه .
{}- تعریف کننده / سازنده یک آبجکت ( شئی) .
/ab+c/i- یک ترکیب صحیح از عبارتها
( )- دسته بندی عمل ها
عبارت های سمت چپ
مقدارهای سمت چپ مشخص کردن هدف هستند
- Property accessors
- عمل های شامل درستی به یک ویژگی یا متد از یک آبجکت(شئی) از قبل تعریف شده
(object.propertyوobject["property"]). new- عمل
newیک سازنده از الگو یا موجودیت از قبل تعریف شده مثل آبجکت - new.target
- In constructors,
new.targetrefers to the constructor that was invoked bynew. super- کلیدواژه
superوالد سازنده را صدا می زند ...obj- The spread operator allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected.
افزایش و کاهش
عملوند پیشوندی/ پسوندی افزایشی و عملوند پیشوندی/پسوندی کاهشی
A++- عملوند پسوندی افزایشی.
A--- عملوند پسوندی کاهشی.
++A- عملوند پیشوندی افزایشی.
--A- عملوند پیشوند کاهشی
عملوند های یکتا
A unary operation is operation with only one operand.
delete- عملوند
deleteویژگی /ها را از یک آبجکت حذف می کند. void- در عمل کننده
voidمقداری برای بازگشت از یک عبارت وجود ندارد. typeoftypeofنوع آبجکت (شئی )دریافتی را مشخص می کند.+- The unary plus operator converts its operand to Number type.
-- The unary negation operator converts its operand to Number type and then negates it.
~- Bitwise NOT operator.
!- Logical NOT operator.
عملوند های منطقی
عملوندهای منطقی روی مقدار عددی اعمال می شوند و یک عدد به عنوان نتیجه منطقی عملوند منطقی خواهد بود
**- عمل توان
Relational operators
A comparison operator compares its operands and returns a Boolean value based on whether the comparison is true.
in- The
inoperator determines whether an object has a given property. instanceof- The
instanceofoperator determines whether an object is an instance of another object. <- Less than operator.
>- Greater than operator.
<=- Less than or equal operator.
>=- Greater than or equal operator.
Note: => is not an operator, but the notation for Arrow functions.
Equality operators
The result of evaluating an equality operator is always of type Boolean based on whether the comparison is true.
Bitwise shift operators
Operations to shift all bits of the operand.
<<- Bitwise left shift operator.
>>- Bitwise right shift operator.
>>>- Bitwise unsigned right shift operator.
Binary bitwise operators
Bitwise operators treat their operands as a set of 32 bits (zeros and ones) and return standard JavaScript numerical values.
Binary logical operators
Logical operators are typically used with boolean (logical) values, and when they are, they return a boolean value.
Conditional (ternary) operator
(condition ? ifTrue : ifFalse)-
The conditional operator returns one of two values based on the logical value of the condition.
Assignment operators
An assignment operator assigns a value to its left operand based on the value of its right operand.
=- Assignment operator.
*=- Multiplication assignment.
/=- Division assignment.
%=- Remainder assignment.
+=- Addition assignment.
-=- Subtraction assignment
<<=- Left shift assignment.
>>=- Right shift assignment.
>>>=- Unsigned right shift assignment.
&=- Bitwise AND assignment.
^=- Bitwise XOR assignment.
|=- Bitwise OR assignment.
[a, b] = [1, 2]
{a, b} = {a:1, b:2}-
Destructuring assignment allows you to assign the properties of an array or object to variables using syntax that looks similar to array or object literals.
Comma operator
,- The comma operator allows multiple expressions to be evaluated in a single statement and returns the result of the last expression.
Non-standard features
- Legacy generator function
- The
functionkeyword can be used to define a legacy generator function inside an expression. To make the function a legacy generator, the function body should contains at least oneyieldexpression. - Expression closures
- The expression closure syntax is a shorthand for writing simple function.
-
[for (x of y) x] - Array comprehensions.
-
(for (x of y) y) - Generator comprehensions.
Specifications
| Specification | Status | Comment |
|---|---|---|
| ECMAScript 1st Edition (ECMA-262) The definition of 'Expressions' in that specification. |
Standard | Initial definition |
| ECMAScript 5.1 (ECMA-262) The definition of 'Expressions' in that specification. |
Standard | |
| ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'ECMAScript Language: Expressions' in that specification. |
Standard | New: Spread operator, destructuring assignment, super keyword. |
| ECMAScript Latest Draft (ECMA-262) The definition of 'ECMAScript Language: Expressions' in that specification. |
Draft |

