Skip to content

conversion-library / decimalToOtherBase

Function: decimalToOtherBase()

ts
function decimalToOtherBase(num: number, base: number): string

decimalToOtherBase

alias:tenToOther

Parameters

num: number

Enter decimal numerical value

base: number

Target base

Returns

string

Return the target base string

Example

ts
decimalToOtherBase(10, 2) // '1010'

Defined in

lib/decimal-conversion/decimalAndOtherBase.ts:19