Skip to content

Instantly share code, notes, and snippets.

@robertcoopercode
Created January 9, 2019 00:28
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 robertcoopercode/ae5c31f69b76261b5780073ae6247295 to your computer and use it in GitHub Desktop.
Save robertcoopercode/ae5c31f69b76261b5780073ae6247295 to your computer and use it in GitHub Desktop.
let list = [10, 22, 4, null, 5];
list.push(6); // ✅
list.push(null); // ✅
list.push('nope'); // ❌ - type 'string' is neither of type 'number' or 'null'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment