Skip to content

Instantly share code, notes, and snippets.

@alexcrist
Last active March 2, 2021 17:44
Show Gist options
  • Save alexcrist/35ba07a76b5dc88c0593519973bfcf11 to your computer and use it in GitHub Desktop.
Save alexcrist/35ba07a76b5dc88c0593519973bfcf11 to your computer and use it in GitHub Desktop.
// String to number
const str = '123';
const num1 = parseInt(str);
const num2 = Number(str);
// Number to string
const n = 123;
const s = n.toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment