Skip to content

Instantly share code, notes, and snippets.

@zeptobook
Created June 17, 2020 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeptobook/b84bb687d655763f24501cb87528f11c to your computer and use it in GitHub Desktop.
Save zeptobook/b84bb687d655763f24501cb87528f11c to your computer and use it in GitHub Desktop.
let func = () => {
return 'function call'
}
console.log(func()) // function call
func = null
console.log(func()) // error: Uncaught TypeError: func is not a function
console.log(func?.()) // undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment