Choose where you’d like to start

toHex()

Overview

The toHex() function takes a number as an argument, and returns a string representing the hexadecimal value of that number.

Return Type

  • Text

Syntax

<variable> = <number>.toHex();

(OR)

variable = toHex(<number> );
ParameterDescriptionData type
<variable>Variable which will contain the returned value.TEXT
<number>The number whose hexadecimal value will be returned.NUMBER

Examples

number = 100;
hexValue = number.toHex();             // returns 64

Get Started Now

Execute