Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/dts/lib.es5.d.ts>parseInt

A modern runtime for JavaScript and TypeScript.
Go to Latest
function parseInt
import { parseInt } from "https://deno.land/x/deno@v1.28.1/cli/dts/lib.es5.d.ts";

Converts a string to an integer.

Parameters

string: string

A string to convert into a number.

optional
radix: number

A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.

Returns

number