Skip to content

Instantly share code, notes, and snippets.

@ebonneville
Created April 27, 2012 01:22
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 ebonneville/2504818 to your computer and use it in GitHub Desktop.
Save ebonneville/2504818 to your computer and use it in GitHub Desktop.
parseFloat("10.5");
>> 10.5
parseFloat("s10.5");
>> NaN
parseFloat("10.5s");
>> 10.5
parseFloat("10.5 5.10");
>> 10.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment