Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## null 활용
- let headings = null;
- 값 할당 안 된 변수에 null 처리
- - 소소하게 좋은 점
- - const 쓸지, let 쓸지 판단하기 좋다.
- - 눈에 띄게 좋은 점
- - undefined 나왔을 때 프로세스를 거쳤는지 안 거쳤는지 알기 쉽다
- - null 미리 할당 해줬으면 프로세스는 거쳤는데 도중에 문제가 있다는 소리고, undefined는 거친 적도 없다는 소리니까 버그 고칠 때 참고할 수 있는 정보가 됨
- ```js
- const data = [
- {
- when : '2 mins age',
- who : 'dotori',
- description: 'created new account'
- }
- ]
- ```
Add Comment
Please, Sign In to add comment