Skip to content

Instantly share code, notes, and snippets.

@prof3ssorSt3v3
Created January 8, 2020 16:33
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 prof3ssorSt3v3/2c70a01e20ba194605073df7702903ed to your computer and use it in GitHub Desktop.
Save prof3ssorSt3v3/2c70a01e20ba194605073df7702903ed to your computer and use it in GitHub Desktop.
let log = console.log;
let myInt = 123;
let myStrInt = "456";
let address = "456 Main Ave.";
let myFloat = 123.456;
let myStrFloat = "345.567.789.345";
let cost = "12.99 per box";
//parseInt parseFloat
log(parseInt(address)); //456
log(parseFloat(address)); //456
log(parseFloat(myStrFloat));
log(parseFloat(cost));
log(parseInt(cost));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment