Skip to content

Instantly share code, notes, and snippets.

@robertcoopercode
Created January 9, 2019 00:27
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/6486cdbf5efa9c108c96a5b8c7c2a348 to your computer and use it in GitHub Desktop.
Save robertcoopercode/6486cdbf5efa9c108c96a5b8c7c2a348 to your computer and use it in GitHub Desktop.
function add(a: number, b: number) {
return a + b;
}
const result = add(2, 4);
result.toFixed(2); // ✅
result.length; // ❌ - length is not a property of number types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment