Edit this page

parseFloat

Parses a string as a floating point number.

Example

<script src="https://kendo.cdn.telerik.com/2018.2.620/js/cultures/kendo.culture.de-DE.min.js"></script>
<script>
  console.log(kendo.parseFloat("12.22")); // outputs "12.22"
  kendo.culture("de-DE");
  console.log(kendo.parseFloat("1.212,22 €")); // outputs "1212.22"
  console.log(kendo.parseFloat("invalid")); // outputs "null"
</script>

Returns

Number the parsed number. Returns null if the value cannot be parsed as a valid Number.

Parameters

value String

The string which should be parsed as a Number.

culture String (optional)

The culture used to parse the number. The current culture is used by default.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy