Guest User

Untitled

a guest
Jul 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ## null 활용
  2. let headings = null;
  3.  
  4. 값 할당 안 된 변수에 null 처리
  5. - 소소하게 좋은 점
  6. - const 쓸지, let 쓸지 판단하기 좋다.
  7. - 눈에 띄게 좋은 점
  8. - undefined 나왔을 때 프로세스를 거쳤는지 안 거쳤는지 알기 쉽다
  9. - null 미리 할당 해줬으면 프로세스는 거쳤는데 도중에 문제가 있다는 소리고, undefined는 거친 적도 없다는 소리니까 버그 고칠 때 참고할 수 있는 정보가 됨
  10.  
  11. ```js
  12. const data = [
  13. {
  14. when : '2 mins age',
  15. who : 'dotori',
  16. description: 'created new account'
  17. }
  18. ]
  19. ```
Add Comment
Please, Sign In to add comment