Вирази та оператори
Цей розділ документує всі оператори, вирази й ключові слова мови JavaScript.
Вирази та оператори за категоріями
Для перегляду списку в алфавітному порядку зверніть увагу на ліву бокову панель.
Первинні вирази
Базові ключові слова та загальні вирази в JavaScript. Ці вирази мають вищий пріоритет (вищий за пріоритет операторів).
this
(це)Ключове слово
this
посилається на спеціальну властивість контексту виконання.- Літерали
Базові літерали
null
, булевих значень, чисел та рядків.[]
Синтаксис ініціалізаторів, чи літералів, масивів.
{}
Синтаксис об'єктних ініціалізаторів – літералів.
function
(функція)Ключове слово
function
оголошує функціональний вираз.class
(клас)Ключове слово
class
оголошує вираз класу.function*
Ключове слово
function*
оголошує вираз функції-генератора.async function
(асинхронна функція)async function
оголошує вираз асинхронної функції.async function*
Ключові слова
async function*
оголошують вираз асинхронної функції-генератора./ab+c/i
Літеральний синтаксис регулярного виразу.
`string`
Синтаксис шаблонних літералів.
( )
(дужки)Оператор групування.
Вирази лівої сторони
Лівосторонні значення є пунктом призначення для присвоєння.
- Засоби доступу до властивостей
Оператори роботи з членами надають доступ до властивостей чи методів об'єкта (
object.property
іobject["property"]
)?.
Оператор необов'язкового зв'язування повертає
undefined
замість спричинення помилки, коли посилання є порожнім (дорівнюєnull
абоundefined
).new
(нове)Оператор
new
створює новий екземпляр об'єкта за допомогою переданого конструктора.new.target
(нове.цільовий)Всередині конструктора
new.target
посилається на конструктор, який було викликано операторомnew
.import.meta
(імпорт.метадані)Об'єкт, що розкриває контекстно-специфічні метадані JavaScript-модуля.
super
(вищий)Ключове слово
super
викликає батьківський конструктор або дає змогу звертатися до властивостей батьківського об'єкта.import()
Синтаксис
import()
дає змогу асинхронно та динамічно завантажувати модуль в середовищі, котре може не бути модульним.
Збільшення та зменшення на одиницю
Постфіксні та префіксні оператори інкременту та декременту.
A++
Постфіксний оператор інкременту.
A--
Постфіксний оператор декременту.
++A
Префіксний оператор інкременту.
--A
Префіксний оператор декременту.
Унарні оператори
Унарна операція — це операція з лише одним операндом.
delete
(видалити)Оператор
delete
видаляє властивість з об'єкта.void
(відкинути)Оператор
void
обчислює вираз та відкидає повернене ним значення.typeof
(тип ...)Оператор
typeof
визначає тип переданого об'єкта.+
(плюс)Оператор «унарний плюс» перетворює операнд на значення типу Number.
-
(мінус)Оператор «унарний мінус» перетворює операнд на значення типу Number, а потім робить його від'ємним.
~
(тильда)Бітовий оператор NOT.
!
(знак оклику)Логічний оператор NOT.
await
Призупиняє та відновлює виконання асинхронної функції та очікує на сповнення чи відхилення промісу.
Арифметичні оператори
Арифметичні оператори приймають числові значення (як літерали, так і змінні) своїми операндами, і повертають єдине числове значення.
**
Оператор піднесення до степеня.
*
(зірочка)Оператор множення.
/
Оператор ділення.
%
(відсоток)Оператор взяття остачі від ділення.
+
(Plus)Оператор додавання.
-
Оператор віднімання.
Оператори відношення
Оператор порівняння порівнює операнди та повертає булеве значення, котре залежить від того, чи виконується умова порівняння.
<
(менше)Оператор «менше».
>
(більше)Оператор «більше».
<=
Оператор «менше або дорівнює».
>=
Оператор «більше або дорівнює».
instanceof
Оператор
instanceof
встановлює, чи є об'єкт примірником іншого об'єкта.in
Оператор
in
встановлює, чи має об'єкт дану властивість.
[!NOTE]
=>
— це не оператор, а позначення для стрілкових функцій.
Оператори рівності
Результат обчислення оператора рівності — це завжди величина булевого типу, і її значення залежить від того, чи порівняння є істинним.
==
Оператор рівності.
!=
Оператор нерівності.
===
Оператор точної рівності.
!==
Оператор точної нерівності.
Оператори побітового зсуву
Операції зміщення всіх бітів операнда.
<<
Оператор побітового зсуву вліво.
>>
Оператор побітового зсуву вправо.
>>>
Оператор беззнакового побітового зсуву вправо.
Бінарні бітові оператори
Бітові оператори вважають свої операнди наборами з 32 бітів (нулів та одиниць), і повертають стандартні для JavaScript числові значення.
Бінарні логічні оператори
Логічні оператори реалізовують булеві (логічні) значення й мають логіку закорочення.
Умовний (тернарний) оператор
(condition ? ifTrue : ifFalse)
Умовний оператор повертає одне з двох значень залежно від логічного значення умови.
Оператори присвоєння
Оператор присвоєння присвоює певне значення лівому операнду на основі значення правого.
=
(дорівнює)Оператор присвоєння.
*=
Присвоєння з множенням.
/=
Присвоєння з діленням.
%=
Присвоєння з отриманням остачі.
+=
Присвоєння з додаванням.
-=
Присвоєння з відніманням.
<<=
Присвоєння зі зсувом вліво.
>>=
Присвоєння зі зсувом вправо.
>>>=
Присвоєння з беззнаковим зсувом вправо.
&=
Присвоєння з бітовим AND.
^=
Присвоєння з бітовим XOR.
|=
Присвоєння з бітовим OR.
**=
Присвоєння з піднесенням до степеня.
&&=
Присвоєння з логічним AND.
||=
Присвоєння з логічним OR.
??=
Присвоєння з нульовим злиттям.
[a, b] = arr
,{ a, b } = obj
Присвоєння з деструктуризацією дає змогу призначити властивості масиву чи об'єкта змінним, з використанням синтаксису, який має подібний до літералів масивів та об'єктів вигляд.
Оператори видачі
yield
Призупиняє й відновлює виконання генераторної функції.
yield*
Делегує видачу іншій генераторній функції або ітерованому об'єктові.
Синтаксис розгортання
...obj
Синтаксис розгортання дає змогу розпустити ітерований об'єкт, як то масив чи рядок, у місцях, де очікуються нуль або більше аргументів (у випадку викликів функцій) чи елементів (у випадку літералів масивів). У об'єктному літералі синтаксис розгортання перелічує властивості об'єкта й додає пари ключ-значення до об'єкта, що створюється.
Оператор коми
,
Оператор кома дозволяє обчислити декілька виразів як одну інструкцію і повертає результат останнього виразу.
Специфікації
Сумісність з браузерами
desktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Addition (+ )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Addition assignment (x += y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Assignment (x = y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
async function expression
|
Chrome Full support 55 | Edge Full support 15 | Firefox Full support 52 | Internet Explorer No support Ні | Opera Full support 42 | Safari Full support 10.1 | WebView Android Full support 55 | Chrome Android Full support 55 | Firefox for Android Full support 52 | Opera Android Full support 42 | Safari on iOS Full support 10.3 | Samsung Internet Full support 6.0 | Deno Full support 1.0 | Node.js Full support 7.6.0 |
async function* expression
|
Chrome Full support 63 | Edge Full support 79 | Firefox Full support 55 | Internet Explorer No support Ні | Opera Full support 50 | Safari Full support 12 | WebView Android Full support 63 | Chrome Android Full support 63 | Firefox for Android Full support 55 | Opera Android Full support 46 | Safari on iOS Full support 12 | Samsung Internet Full support 8.0 | Deno Full support 1.0 | Node.js Full support 10.0.0 |
await
|
Chrome Full support 55 | Edge Full support 14 | Firefox Full support 52 | Internet Explorer No support Ні | Opera Full support 42 | Safari Full support 10.1 | WebView Android Full support 55 | Chrome Android Full support 55 | Firefox for Android Full support 52 | Opera Android Full support 42 | Safari on iOS Full support 10.3 | Samsung Internet Full support 6.0 | Deno Full support 1.0 | Node.js Full support 7.6.0 |
Use at module top level
|
Chrome Full support 89 | Edge Full support 89 | Firefox Full support 89 | Internet Explorer No support Ні | Opera Full support 75 | Safari Full support 15 | WebView Android Full support 89 | Chrome Android Full support 89 | Firefox for Android Full support 89 | Opera Android Full support 63 | Safari on iOS Full support 15 | Samsung Internet Full support 15.0 | Deno Full support 1.0 | Node.js Full support 14.8.0 |
Bitwise AND (a & b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise AND assignment (x &= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise NOT (~a )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise OR (a | b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise OR assignment (x |= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise XOR (a ^ b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise XOR assignment (x ^= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
class
|
Chrome Full support 42 | Edge Full support 13 | Firefox Full support 45 | Internet Explorer No support Ні | Opera Full support 29 | Safari Full support 7 | WebView Android Full support 42 | Chrome Android Full support 42 | Firefox for Android Full support 45 | Opera Android Full support 29 | Safari on iOS Full support 7 | Samsung Internet Full support 4.0 | Deno Full support 1.0 | Node.js Full support 6.0.0 |
Comma operator | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Conditional operator (c ? t : f )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Decrement (-- )
|
Chrome Full support 2 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 4 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 3.2 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
delete
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 4 | Opera Full support 9 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Destructuring assignment | Chrome Full support 49 | Edge Full support 14 | Firefox Full support 41 | Internet Explorer No support Ні | Opera Full support 36 | Safari Full support 8 | WebView Android Full support 49 | Chrome Android Full support 49 | Firefox for Android Full support 41 | Opera Android Full support 36 | Safari on iOS Full support 8 | Samsung Internet Full support 5.0 | Deno Full support 1.0 | Node.js Full support 6.0.0 |
Computed property names
|
Chrome Full support 49 | Edge Full support 14 | Firefox Full support 41 | Internet Explorer No support Ні | Opera Full support 36 | Safari Full support 10 | WebView Android Full support 49 | Chrome Android Full support 49 | Firefox for Android Full support 41 | Opera Android Full support 36 | Safari on iOS Full support 10 | Samsung Internet Full support 5.0 | Deno Full support 1.0 | Node.js Full support 6.0.0 |
Rest in arrays
|
Chrome Full support 49 | Edge Full support 16 | Firefox Full support 41 | Internet Explorer No support Ні | Opera Full support 36 | Safari Full support 9.1 | WebView Android Full support 49 | Chrome Android Full support 49 | Firefox for Android Full support 41 | Opera Android Full support 36 | Safari on iOS Full support 9.3 | Samsung Internet Full support 5.0 | Deno Full support 1.0 | Node.js Full support 6.0.0 |
Rest in objects
|
Chrome Full support 60 | Edge Full support 79 | Firefox Full support 55 | Internet Explorer No support Ні | Opera Full support 47 | Safari Full support 11.1 | WebView Android Full support 60 | Chrome Android Full support 60 | Firefox for Android Full support 55 | Opera Android Full support 44 | Safari on iOS Full support 11.3 | Samsung Internet Full support 8.0 | Deno Full support 1.0 | Node.js Full support 8.3.0 |
Division (/ )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Division assignment (x /= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Equality (a == b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Exponentiation (** )
|
Chrome Full support 52 | Edge Full support 14 | Firefox Full support 52 | Internet Explorer No support Ні | Opera Full support 39 | Safari Full support 10.1 | WebView Android Full support 51 | Chrome Android Full support 52 | Firefox for Android Full support 52 | Opera Android Full support 41 | Safari on iOS Full support 10.3 | Samsung Internet Full support 6.0 | Deno Full support 1.0 | Node.js Full support 7.0.0 |
Exponentiation assignment (x **= y )
|
Chrome Full support 52 | Edge Full support 14 | Firefox Full support 52 | Internet Explorer No support Ні | Opera Full support 39 | Safari Full support 10.1 | WebView Android Full support 51 | Chrome Android Full support 52 | Firefox for Android Full support 52 | Opera Android Full support 41 | Safari on iOS Full support 10.3 | Samsung Internet Full support 6.0 | Deno Full support 1.0 | Node.js Full support 7.0.0 |
function expression
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Trailing comma in parameters
|
Chrome Full support 58 | Edge Full support 14 | Firefox Full support 52 | Internet Explorer No support Ні | Opera Full support 45 | Safari Full support 10 | WebView Android Full support 58 | Chrome Android Full support 58 | Firefox for Android Full support 52 | Opera Android Full support 43 | Safari on iOS Full support 10 | Samsung Internet Full support 7.0 | Deno Full support 1.0 | Node.js Full support 8.0.0 |
function* expression
|
Chrome Full support 49 | Edge Full support 12 | Firefox Full support 26 | Internet Explorer No support Ні | Opera Full support 36 | Safari Full support 10 | WebView Android Full support 49 | Chrome Android Full support 49 | Firefox for Android Full support 26 | Opera Android Full support 36 | Safari on iOS Full support 10 | Samsung Internet Full support 5.0 | Deno Full support 1.0 | Node.js Full support 4.0.0 |
Trailing comma in parameters
|
Chrome Full support 58 | Edge Full support 79 | Firefox Full support 52 | Internet Explorer No support Ні | Opera Full support 45 | Safari Full support 10 | WebView Android Full support 58 | Chrome Android Full support 58 | Firefox for Android Full support 52 | Opera Android Full support 43 | Safari on iOS Full support 10 | Samsung Internet Full support 7.0 | Deno Full support 1.0 | Node.js Full support 8.0.0 |
Greater than (a > b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Greater than or equal (a >= b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Grouping operator ()
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
in
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 5.5 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Increment (++ )
|
Chrome Full support 2 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 4 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 3.2 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Inequality (a != b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
instanceof
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 5 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise left shift (a << b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Left shift assignment (x <<= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Less than (a < b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Less than or equal (a <= b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Logical AND (&& )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Logical AND assignment (x &&= y )
|
Chrome Full support 85 | Edge Full support 85 | Firefox Full support 79 | Internet Explorer No support Ні | Opera Full support 71 | Safari Full support 14 | WebView Android Full support 85 | Chrome Android Full support 85 | Firefox for Android Full support 79 | Opera Android Full support 60 | Safari on iOS Full support 14 | Samsung Internet Full support 14.0 | Deno Full support 1.2 | Node.js Full support 15.0.0 |
Logical NOT (! )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Logical nullish assignment (x ??= y )
|
Chrome Full support 85 | Edge Full support 85 | Firefox Full support 79 | Internet Explorer No support Ні | Opera Full support 71 | Safari Full support 14 | WebView Android Full support 85 | Chrome Android Full support 85 | Firefox for Android Full support 79 | Opera Android Full support 60 | Safari on iOS Full support 14 | Samsung Internet Full support 14.0 | Deno Full support 1.2 | Node.js Full support 15.0.0 |
Logical OR (|| )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Logical OR assignment (x ||= y )
|
Chrome Full support 85 | Edge Full support 85 | Firefox Full support 79 | Internet Explorer No support Ні | Opera Full support 71 | Safari Full support 14 | WebView Android Full support 85 | Chrome Android Full support 85 | Firefox for Android Full support 79 | Opera Android Full support 60 | Safari on iOS Full support 14 | Samsung Internet Full support 14.0 | Deno Full support 1.2 | Node.js Full support 15.0.0 |
Multiplication (* )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Multiplication assignment (x *= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
new
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
new.target
|
Chrome Full support 46 | Edge Full support 13 | Firefox Full support 41 | Internet Explorer No support Ні | Opera Full support 33 | Safari Full support 11 | WebView Android Full support 46 | Chrome Android Full support 46 | Firefox for Android Full support 41 | Opera Android Full support 33 | Safari on iOS Full support 11 | Samsung Internet Full support 5.0 | Deno Full support 1.0 | Node.js Full support 5.0.0 |
Nullish coalescing operator (?? )
|
Chrome Full support 80 | Edge Full support 80 | Firefox Full support 72 | Internet Explorer No support Ні | Opera Full support 67 | Safari Full support 13.1 | WebView Android Full support 80 | Chrome Android Full support 80 | Firefox for Android Full support 79 | Opera Android Full support 57 | Safari on iOS Full support 13.4 | Samsung Internet Full support 13.0 | Deno Full support 1.0 | Node.js Full support 14.0.0 |
Object initializer | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 1 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Computed property names
|
Chrome Full support 47 | Edge Full support 12 | Firefox Full support 34 | Internet Explorer No support Ні | Opera Full support 34 | Safari Full support 8 | WebView Android Full support 47 | Chrome Android Full support 47 | Firefox for Android Full support 34 | Opera Android Full support 34 | Safari on iOS Full support 8 | Samsung Internet Full support 5.0 | Deno Full support ?null | Node.js Full support 4.0.0 |
Shorthand method names
|
Chrome Full support 47 | Edge Full support 12 | Firefox Full support 34 | Internet Explorer No support Ні | Opera Full support 34 | Safari Full support 9 | WebView Android Full support 47 | Chrome Android Full support 47 | Firefox for Android Full support 34 | Opera Android Full support 34 | Safari on iOS Full support 9 | Samsung Internet Full support 5.0 | Deno Full support ?null | Node.js Full support 4.0.0 |
Shorthand property names
|
Chrome Full support 47 | Edge Full support 12 | Firefox Full support 33 | Internet Explorer No support Ні | Opera Full support 34 | Safari Full support 9 | WebView Android Full support 47 | Chrome Android Full support 47 | Firefox for Android Full support 33 | Opera Android Full support 34 | Safari on iOS Full support 9 | Samsung Internet Full support 5.0 | Deno Full support ?null | Node.js Full support 4.0.0 |
Spread properties
|
Chrome Full support 60 | Edge Full support 79 | Firefox Full support 55 | Internet Explorer No support Ні | Opera Full support 47 | Safari Full support 11.1 | WebView Android Full support 60 | Chrome Android Full support 60 | Firefox for Android Full support 55 | Opera Android Full support 44 | Safari on iOS Full support 11.3 | Samsung Internet Full support 8.0 | Deno Full support ?null | Node.js Full support 8.3.0 |
Optional chaining operator (?. )
|
Chrome Full support 80 | Edge Full support 80 | Firefox Full support 74 | Internet Explorer No support Ні | Opera Full support 67 | Safari Full support 13.1 | WebView Android Full support 80 | Chrome Android Full support 80 | Firefox for Android Full support 79 | Opera Android Full support 57 | Safari on iOS Full support 13.4 | Samsung Internet Full support 13.0 | Deno Full support 1.0 | Node.js Full support 14.0.0 |
Property accessors | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Remainder (% )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Remainder assignment (x %= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise right shift (a >> b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Right shift assignment (x >>= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Strict equality (a === b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 4 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Strict inequality (a !== b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 4 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Subtraction (- )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Subtraction assignment (x -= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
super
|
Chrome Full support 42 | Edge Full support 13 | Firefox Full support 45 | Internet Explorer No support Ні | Opera Full support 29 | Safari Full support 7 | WebView Android Full support 42 | Chrome Android Full support 42 | Firefox for Android Full support 45 | Opera Android Full support 29 | Safari on iOS Full support 7 | Samsung Internet Full support 4.0 | Deno Full support 1.0 | Node.js Full support 6.0.0 |
this
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 4 | Opera Full support 9.5 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
typeof
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Unary negation (- )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Unary plus (+ )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 4 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Bitwise unsigned right shift (a >>> b )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
Unsigned right shift assignment (x >>>= y )
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 3 | Opera Full support 3 | Safari Full support 1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 1 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
void
|
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | Internet Explorer Full support 5 | Opera Full support 4 | Safari Full support 3.1 | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox for Android Full support 4 | Opera Android Full support 10.1 | Safari on iOS Full support 3 | Samsung Internet Full support 1.0 | Deno Full support 1.0 | Node.js Full support 0.10.0 |
yield
|
Chrome Full support 39 | Edge Full support 12 | Firefox Full support 26 | Internet Explorer No support Ні | Opera Full support 26 | Safari Full support 10 | WebView Android Full support 39 | Chrome Android Full support 39 | Firefox for Android Full support 26 | Opera Android Full support 26 | Safari on iOS Full support 10 | Samsung Internet Full support 4.0 | Deno Full support 1.0 | Node.js Full support 4.0.0 |
yield*
|
Chrome Full support 39 | Edge Full support 12 | Firefox Full support 27 | Internet Explorer No support Ні | Opera Full support 26 | Safari Full support 10 | WebView Android Full support 39 | Chrome Android Full support 39 | Firefox for Android Full support 27 | Opera Android Full support 26 | Safari on iOS Full support 10 | Samsung Internet Full support 4.0 | Deno Full support 1.0 | Node.js Full support 4.0.0 |