본문 바로가기

ren+gin+eer

검색하기
ren+gin+eer
프로필사진 윤보람

  • 분류 전체보기 (52)
    • javascript (5)
    • java (27)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
  • 영유
  • 체크리스트
  • This
  • JavaScript
  • this is this
  • 영어유치원
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록This (1)

ren+gin+eer

this

나는 this가 javascript의 encapsulation로 가는 시작점이라고 생각한다. javascript에서 this가 어려운 이유는 javascript는 prototype 타입 언어이며 까다로운 scope 정책 때문이라고 생각한다. 자바 같은 경우는 private 접근지정자로 명확한 scope와 encapsulation을 지원하기 때문에 this 때문에 혼란스러울 일이 없다. public class Clazz { private String foo; private int bar; public String getFoo() { return this.foo; } public int getBar() { retrun this.bar; } } // scope가 너무 명확해 this가 헷갈릴 여지가 없다. t..

javascript 2019. 3. 28. 10:38
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바