operator
- String concatenation : + 기호를 사용해 문자열과 문자열을 이어준다
console.log('my' + 'cat'); console.log('1' + 2); console.log('string literals : 1 +2 = ${1+2');
-
Numeric operators : 수학 연산자 -> + - / * % **
- Increment and decrement operators : 중감 ++ , –
let counter = 2; const preIncrement = ++counter;
- counter = counter + 1; => counter에 1을 더해서 다시 counter에 값을 할당
- preIncrement - counter; => counter에 값이 할당 된 후 preIncrement에 counter의 값을 할당한다
- const postIncrement = counter++;
- postIncrement = counter; => counter의 값을 postIncrement 에 할당
- counter = counter + 1; => 그다음 counter에 1을 더해준다
- Assignment operators : = -> 할당한다
- Comparison operators : <, >, <=, => -> 비교
-
Logical operators : (or), &&(and), !(not) - Equality : == , ===
- Conditional oerators : if
- Tranry operator : ?
- Switch statement
-
Loops : while,do-whild,for
for(let i=0; i<10; i++){ if(i>8){ brdak; } }