A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/parseInt below:

parseInt · WebPlatform Docs

parseInt Summary

Converts a string to an integer.

Syntax
parseInt( numString , [ radix ])
numString
Required. A string to convert into a number.
radix
Optional. A value between 2 and 36 that specifies the base of the number in numString. If this argument is not supplied, strings with a prefix of ‘0x’ are considered hexadecimal. All other strings are considered decimal.
Examples
parseInt("123.45");  
parseInt("abc");  
parseInt("12abc");  
Remarks

The parseInt function returns an integer value equal to the number contained in numString. If no prefix of numString can be successfully parsed into an integer, NaN (not a number) is returned.

You can test for NaN using the isNaN function.

See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4