Created
December 28, 2018 11:17
-
-
Save qkreltms/90ed044a95a507ca15f635f8bd002af8 to your computer and use it in GitHub Desktop.
javascript object가 초기화 되었는지 확인하는 방법
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (obj) { | |
| //값이 있을 경우 | |
| } | |
| //응용 | |
| arr = [1, 2, 3] | |
| arr.length ? return (obj.map((number) => <h1>{number}</h1>)) : return (<h1>값이 없음!</h1>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment