• Home
  • About
    • back
    • ming photo

      ming

      studying

    • Learn More
    • Twitter
    • Facebook
    • Instagram
    • Github
    • Steam
  • Archive
    • back
    • All Posts
    • All Tags
    • All categories
  • categories
    • back
    • HTML+CSS+JavaScript
    • JAVA
    • Algorithm
    • DB
    • JSP
    • 정보처리기사
    • Spring
    • Thymeleaf
    • 기술면접
  • Projects

JS-ellie-operator

27 Jan 2021

operator

  1. String concatenation : + 기호를 사용해 문자열과 문자열을 이어준다
     console.log('my' + 'cat');
     console.log('1' + 2);
     console.log('string literals : 1 +2 = ${1+2');
    
  2. Numeric operators : 수학 연산자 -> + - / * % **

  3. 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을 더해준다
  4. Assignment operators : = -> 할당한다
  5. Comparison operators : <, >, <=, => -> 비교
  6. Logical operators :   (or), &&(and), !(not)
  7. Equality : == , ===
  8. Conditional oerators : if
  9. Tranry operator : ?
  10. Switch statement
  11. Loops : while,do-whild,for

    for(let i=0; i<10; i++){
        if(i>8){
            brdak;
        }
    }
    


Share Tweet +1