Skip to content

Instantly share code, notes, and snippets.

@hw0k
Created August 30, 2020 11:29
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 hw0k/361fdb584b6b1fbb8961459549b5a54d to your computer and use it in GitHub Desktop.
Save hw0k/361fdb584b6b1fbb8961459549b5a54d to your computer and use it in GitHub Desktop.
TSB 2
function checkNumberIsZero(par: number): boolean {
return par === 0;
}
checkNumberIsZero(0); // true
checkNumberIsZero([]); // Error!
checkNumberIsZero(""); // Error!
checkNumberIsZero(false); // Error!
checkNumberIsZero(this); // Error!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment