Skip to content

Instantly share code, notes, and snippets.

@qkreltms
Created December 28, 2018 11:17
Show Gist options
  • Select an option

  • Save qkreltms/90ed044a95a507ca15f635f8bd002af8 to your computer and use it in GitHub Desktop.

Select an option

Save qkreltms/90ed044a95a507ca15f635f8bd002af8 to your computer and use it in GitHub Desktop.
javascript object가 초기화 되었는지 확인하는 방법
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