<body>
    <script>
      document.body.innerHTML = "<h1>안녕</h1>"
    </script>
</body>

: 책 앞부분의 예제를 따라하다가 script 부분을 head에서 body로 옮기지 않고 실행했더니 "TypeError: Cannot read properties of null"가 떴다. element가 이미 존재하는 상태에서 가져오거나 갈아치우는 형식이기 때문에 head에 넣었을 경우 head가 body보다 먼저 실행 돼 에러가 뜬 것이었다. 순서를 잘 확인하자!

infix and postfix expressions
: In a postfix expression, an operator is written after its operands.
ex) 2+34(infix) / 234+(postfix)
Postfix notations can be used in intermediate code generation in compiler design. Prefix and Postfix notations are easier to parse for a machine.

minification
: 개발시 편의를 위해 사용하는 띄어쓰기, 줄바꿈 등을 컴퓨터가 실행할때 자동적으로 빈 공간을 줄여 파일 사이즈를 축소시키는 것

hoisting
: refers to the process whereby the interpreter appears to move the declaration of functions, variables or classes to the top of their scope, prior to execution of the code.

익명 함수
: 일반 함수의 경우 불필요한 메모리를 차지하게 되니 함수가 일회성일땐 익명 함수로 사용. hoisting 적용x

for...in문
: 값이 아닌 key 전달

일급 객체
: 일급 객체(first-class object)란 다른 객체들에 일반적으로 적용 가능한 연산을 모두 지원하는 객체를 가리킨다. 보통 함수에 인자로 넘기기, 수정하기, 변수에 대입하기와 같은 연산을 지원할 때 일급 객체라고 한다.

0개의 댓글