# 表達式

``"^\d\.\$"``

``````var x = function calc() {
return 10;
}``````
Delete `delete expression`
``delete obj.property;``
Void `void expression`
``void (2 == '2');``

``typeof 42;``

``````var fruits = ["apple"];
fruits[0];``````

``out.value``

``new Date('1994-10-11')``

``var x=10; x++;``

``var x=10; x--;``

``var x=10; ++x;``

``var x=10; --x;``

``+x / -x;``

``````const a = 5;
console.log( ~a );``````

``!(a > 0 || b > 0)``

``(x + y) * (a / b)``

``(a + b) - (a - (a + b))``

``(a >> b) >>> c``

``if (a > b) { ... }``
In (入) `expression in expression`
``fruits[0] in otherFruits;``

``if (a == b) { ... }``

``a & b / a ^ b / a | b``

``if (a && (b ||c)) { ...}``
Ternary ```expression ? expression : expression```
``a > b ? obj.prop : 0``

``out.value = "string";``

``a *= 10;``

``a <<= 10;``

``fruits=[10, 20, 30];``

``x = null;``

``x = true;``

``````a = 'hello',
b = "world";``````

``111.11 e+12``

``0x123ABC``

``"O51"``

``v = [a, b, c];``

``out = {value: 1, flag: false};``

``x + (x + y)``