표현식 - Amazon Lex

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

표현식

표현식 유형 조건 지원?
정규식 리터럴 유효한 정규식 특수 문자를 포함하는 문자열 리터럴
"^\d\.$"
아니요
함수 function functionName(parameters) { functionBody}
var x = function calc() { return 10; }
아니요
Delete delete expression
delete obj.property;
아니요
Void void expression
void (2 == '2');
아니요
Typeof typeof expression
typeof 42;
아니요
Member index expression [ expressions ]
var fruits = ["apple"]; fruits[0];
Member dot expression . identifier
out.value
Arguments expression (arguments)
new Date('1994-10-11')
Post increment expression++
var x=10; x++;
Post decrement expression--
var x=10; x--;
Pre increment ++expression
var x=10; ++x;
Pre decrement --expression
var x=10; --x;
Unary plus / Unary minus +expression / -expression
+x / -x;
Bit not ~ expression
const a = 5; console.log( ~a );
Logical not ! expression
!(a > 0 || b > 0)
Multiplicative expression ('*' | '/' | '%') expression
(x + y) * (a / b)
Additive expression ('+' | '-') expression
(a + b) - (a - (a + b))
Bit shift expression ('<<' | '>>' | '>>>') expression
(a >> b) >>> c
Relative expression ('<' | '>' | '<=' | '>=') expression
if (a > b) { ... }
In expression in expression
fruits[0] in otherFruits;
Equality expression ('==' | '!=' | '===' | '!===') expression
if (a == b) { ... }
Bit and / xor / or expression ('&' | '^' | '|') expression
a & b / a ^ b / a | b
Logical and / or expression ('&&' | '||') expression
if (a && (b ||c)) { ...}
3진 expression ? expression : expression
a > b ? obj.prop : 0
대입 expression = expression
out.value = "string";
Assignment operator expression ('*=' | '/=' | '+=' | '-=' | '%=') expression
a *= 10;
Assignment bitwise operator expression ('<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=') expression
a <<= 10;
식별자 identifierSequence 여기서 identifierSequence유효한 문자의 시퀀스임
fruits=[10, 20, 30];
Null literal null
x = null;
Boolean literal true | false
x = true;
String literal 'string' / "string"
a = 'hello', b = "world";
Decimal literal integer [.] digits [exponent]
111.11 e+12
Hex literal 0 (x | X)[0-9a-fA-F]
0x123ABC
Octal literal O [0-7]
"O51"
Array literal [ expression, ... ]
v = [a, b, c];
Object literal {property: value, ...}
out = {value: 1, flag: false};
Parenthesized ( expressions )
x + (x + y)