{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#MAX_VALUE]
The largest representable number.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MIN_VALUE]
The smallest representable number.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#NEGATIVE_INFINITY]
Special value representing negative infinity; returned on overflow.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#NaN]
Special "not a number" value.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#POSITIVE_INFINITY]
Special value representing infinity; returned on overflow.{td}{tr}{tbody}{table}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#toExponential]\()
Returns a string representing the number in exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toExponential]\(fractionDigits)
Returns a string representing the number in exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toFixed]\()
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClientservoy sSummary12%30%58%height: 30px;3Property SummaryThe largest representable number.The smallest representable number.Special value representing negative infinity; returned on overflow.Special "not a number" value.Special value representing infinity; returned on overflow.servoy sSummary12%30%58%height: 30px;3Methods SummaryReturns a string representing the number in exponential notation.Returns a string representing the number in exponential notation.Returns a string representing the number in fixed-point notation.Returns a string representing the number in fixed-point notation.Converts the number into a string which is suitable for presentation in the given locale.Returns a string representing the number to a specified precision in fixed-point or exponential notation.Returns a string representing the number to a specified precision in fixed-point or exponential notation.Returns a string representing the specified Number object.Returns a string representing the specified Number object.propertyservoy sDetail2100%height:30px2Property DetailsMAX_VALUEname
fixed\-point notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toFixed]\(digits)
Returns a string representing the number in fixed\-point notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toLocaleString]\()
Converts the number into a string which is suitable for presentation in the given locale.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toPrecision]\()
exponential notation.
prs
Parameters
sIndentfractionDigitsAn integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.ret
Returns
sIndent A string representing the number in exponential notation.clients
a specified precision in fixed\-point or exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toPrecision]\(precision)
Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toString]\()
fixed-point notation.
prs
Parameters
sIndentdigitsThe number of digits to appear after the decimal point. Defaults to 0.ret
Returns
sIndent A string representing the number in fixed-point notation.clients
Returns a string representing the number to a specified
Number object.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toString]\(radix)
Returns a string representing the specified Number object.{td}{tr}{tbody}{table}\\
{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=MAX_VALUE|class=node}{tr:id=name}{td}h6.MAX_VALUE{td}{tr}{tr:id=des}{td}{sub-section:MAX_VALUE_des|trigger=button|text=}{sub-section}{sub-section:MAX_VALUE_des|trigger=none|class=sIndent}The largest representable number.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MAX_VALUE_snc|trigger=button|text=}{sub-section}{sub-section:MAX_VALUE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MAX_VALUE_prs|trigger=button|text=}{sub-section}{sub-section:MAX_VALUE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MAX_VALUE_ret|trigger=button|text=}{sub-section}{sub-section:MAX_VALUE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MAX_VALUE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MAX_VALUE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MAX_VALUE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MAX_VALUE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MAX_VALUE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MAX_VALUE_sam|trigger=none}{code:language=javascript}
application.output("Largest number: " + Number.MAX_VALUE);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MIN_VALUE|class=node}{tr:id=name}{td}h6.MIN_VALUE{td}{tr}{tr:id=des}{td}{sub-section:MIN_VALUE_des|trigger=button|text=}{sub-section}{sub-section:MIN_VALUE_des|trigger=none|class=sIndent}The smallest representable number.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MIN_VALUE_snc|trigger=button|text=}{sub-section}{sub-section:MIN_VALUE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MIN_VALUE_prs|trigger=button|text=}{sub-section}{sub-section:MIN_VALUE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MIN_VALUE_ret|trigger=button|text=}{sub-section}{sub-section:MIN_VALUE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MIN_VALUE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MIN_VALUE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MIN_VALUE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIN_VALUE_sam|trigger=none}{code:language=javascript}
application.output("Smallest number: " + Number.MIN_VALUE);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NEGATIVE_INFINITY|class=node}{tr:id=name}{td}h6.NEGATIVE_INFINITY{td}{tr}{tr:id=des}{td}{sub-section:NEGATIVE_INFINITY_des|trigger=button|text=}{sub-section}{sub-section:NEGATIVE_INFINITY_des|trigger=none|class=sIndent}Special value representing negative infinity; returned on overflow.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NEGATIVE_INFINITY_snc|trigger=button|text=}{sub-section}{sub-section:NEGATIVE_INFINITY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NEGATIVE_INFINITY_prs|trigger=button|text=}{sub-section}{sub-section:NEGATIVE_INFINITY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NEGATIVE_INFINITY_ret|trigger=button|text=}{sub-section}{sub-section:NEGATIVE_INFINITY_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NEGATIVE_INFINITY_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NEGATIVE_INFINITY_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NEGATIVE_INFINITY_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NEGATIVE_INFINITY_sam|trigger=none}{code:language=javascript}
application.output("Negative infinity: " + Number.NEGATIVE_INFINITY);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NaN|class=node}{tr:id=name}{td}h6.NaN{td}{tr}{tr:id=des}{td}{sub-section:NaN_des|trigger=button|text=}{sub-section}{sub-section:NaN_des|trigger=none|class=sIndent}Special "not a number" value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NaN_snc|trigger=button|text=}{sub-section}{sub-section:NaN_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NaN_prs|trigger=button|text=}{sub-section}{sub-section:NaN_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NaN_ret|trigger=button|text=}{sub-section}{sub-section:NaN_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NaN_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NaN_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NaN_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NaN_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NaN_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NaN_sam|trigger=none}{code:language=javascript}
application.output("NaN: " + Number.NaN);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=POSITIVE_INFINITY|class=node}{tr:id=name}{td}h6.POSITIVE_INFINITY{td}{tr}{tr:id=des}{td}{sub-section:POSITIVE_INFINITY_des|trigger=button|text=}{sub-section}{sub-section:POSITIVE_INFINITY_des|trigger=none|class=sIndent}Special value representing infinity; returned on overflow.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:POSITIVE_INFINITY_snc|trigger=button|text=}{sub-section}{sub-section:POSITIVE_INFINITY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:POSITIVE_INFINITY_prs|trigger=button|text=}{sub-section}{sub-section:POSITIVE_INFINITY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:POSITIVE_INFINITY_ret|trigger=button|text=}{sub-section}{sub-section:POSITIVE_INFINITY_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:POSITIVE_INFINITY_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:POSITIVE_INFINITY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:POSITIVE_INFINITY_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:POSITIVE_INFINITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:POSITIVE_INFINITY_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:POSITIVE_INFINITY_sam|trigger=none}{code:language=javascript}
application.output("Positive infinity: " + Number.POSITIVE_INFINITY);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=toExponential|class=node}{tr:id=name}{td}h6.toExponential{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toExponential{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:toExponential_des|trigger=button|text=}{sub-section}{sub-section:toExponential_des|trigger=none|class=sIndent}Returns a string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toExponential_snc|trigger=button|text=}{sub-section}{sub-section:toExponential_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toExponential_prs|trigger=button|text=}{sub-section}{sub-section:toExponential_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toExponential_ret|trigger=button|text=}{sub-section}{sub-section:toExponential_ret|trigger=none|class=sIndent}[String] -- A string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toExponential_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toExponential_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toExponential_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toExponential_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toExponential_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toExponential_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toExponential(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toExponential-Number|class=node}{tr:id=name}{td}h6.toExponential{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toExponential{span}{span:id=iets|style=float: left;}\(fractionDigits){span}{td}{tr}{tr:id=des}{td}{sub-section:toExponential-Number_des|trigger=button|text=}{sub-section}{sub-section:toExponential-Number_des|trigger=none|class=sIndent}Returns a string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toExponential-Number_snc|trigger=button|text=}{sub-section}{sub-section:toExponential-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:toExponential-Number_prs|trigger=button|text=}{sub-section}{sub-section:toExponential-Number_prs|trigger=none|class=sIndent}\{[Number]} fractionDigits -- An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:toExponential-Number_ret|trigger=button|text=}{sub-section}{sub-section:toExponential-Number_ret|trigger=none|class=sIndent}[String] -- A string representing the number in exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toExponential-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toExponential-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toExponential-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toExponential-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toExponential-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toExponential-Number_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toExponential(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toFixed|class=node}{tr:id=name}{td}h6.toFixed{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toFixed{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:toFixed_des|trigger=button|text=}{sub-section}{sub-section:toFixed_des|trigger=none|class=sIndent}Returns a string representing the number in fixed\-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toFixed_snc|trigger=button|text=}{sub-section}{sub-section:toFixed_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toFixed_prs|trigger=button|text=}{sub-section}{sub-section:toFixed_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toFixed_ret|trigger=button|text=}{sub-section}{sub-section:toFixed_ret|trigger=none|class=sIndent}[String] -- A string representing the number in fixed-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toFixed_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toFixed_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toFixed_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toFixed_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toFixed_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toFixed_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toFixed(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toFixed-Number|class=node}{tr:id=name}{td}h6.toFixed{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toFixed{span}{span:id=iets|style=float: left;}\(digits){span}{td}{tr}{tr:id=des}{td}{sub-section:toFixed-Number_des|trigger=button|text=}{sub-section}{sub-section:toFixed-Number_des|trigger=none|class=sIndent}Returns a string representing the number in fixed\-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toFixed-Number_snc|trigger=button|text=}{sub-section}{sub-section:toFixed-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:toFixed-Number_prs|trigger=button|text=}{sub-section}{sub-section:toFixed-Number_prs|trigger=none|class=sIndent}\{[Number]} digits -- The number of digits to appear after the decimal point. Defaults to 0.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:toFixed-Number_ret|trigger=button|text=}{sub-section}{sub-section:toFixed-Number_ret|trigger=none|class=sIndent}[String] -- A string representing the number in fixed-point notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toFixed-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toFixed-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toFixed-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toFixed-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toFixed-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toFixed-Number_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toFixed(3));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toLocaleString|class=node}{tr:id=name}{td}h6.toLocaleString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toLocaleString{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:toLocaleString_des|trigger=button|text=}{sub-section}{sub-section:toLocaleString_des|trigger=none|class=sIndent}Converts the number into a string which is suitable for presentation in the given locale.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toLocaleString_snc|trigger=button|text=}{sub-section}{sub-section:toLocaleString_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toLocaleString_prs|trigger=button|text=}{sub-section}{sub-section:toLocaleString_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toLocaleString_ret|trigger=button|text=}{sub-section}{sub-section:toLocaleString_ret|trigger=none|class=sIndent}[String] -- A string representing the number in the current locale.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toLocaleString_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toLocaleString_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toLocaleString_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toLocaleString_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toLocaleString_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toLocaleString_sam|trigger=none}{code:language=javascript}
var n = 1000000;
application.output(n.toLocaleString());
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toPrecision|class=node}{tr:id=name}{td}h6.toPrecision{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toPrecision{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:toPrecision_des|trigger=button|text=}{sub-section}{sub-section:toPrecision_des|trigger=none|class=sIndent}Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toPrecision_snc|trigger=button|text=}{sub-section}{sub-section:toPrecision_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toPrecision_prs|trigger=button|text=}{sub-section}{sub-section:toPrecision_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toPrecision_ret|trigger=button|text=}{sub-section}{sub-section:toPrecision_ret|trigger=none|class=sIndent}[String] -- A string representing the number to a specified precision in fixed-point or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toPrecision_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toPrecision_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toPrecision_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toPrecision_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toPrecision_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toPrecision_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toPrecision(5));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toPrecision-Number|class=node}{tr:id=name}{td}h6.toPrecision{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toPrecision{span}{span:id=iets|style=float: left;}\(precision){span}{td}{tr}{tr:id=des}{td}{sub-section:toPrecision-Number_des|trigger=button|text=}{sub-section}{sub-section:toPrecision-Number_des|trigger=none|class=sIndent}Returns a string representing the number to a specified precision in fixed\-point or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toPrecision-Number_snc|trigger=button|text=}{sub-section}{sub-section:toPrecision-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:toPrecision-Number_prs|trigger=button|text=}{sub-section}{sub-section:toPrecision-Number_prs|trigger=none|class=sIndent}\{[Number]} precision -- An integer specifying the number of significant digits.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:toPrecision-Number_ret|trigger=button|text=}{sub-section}{sub-section:toPrecision-Number_ret|trigger=none|class=sIndent}[String] -- A string representing the number to a specified precision in fixed-point or exponential notation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toPrecision-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toPrecision-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toPrecision-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toPrecision-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toPrecision-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toPrecision-Number_sam|trigger=none}{code:language=javascript}
var n = 123.45678;
application.output(n.toPrecision(5));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toString|class=node}{tr:id=name}{td}h6.toString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toString{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:toString_des|trigger=button|text=}{sub-section}{sub-section:toString_des|trigger=none|class=sIndent}Returns a string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toString_snc|trigger=button|text=}{sub-section}{sub-section:toString_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:toString_prs|trigger=button|text=}{sub-section}{sub-section:toString_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:toString_ret|trigger=button|text=}{sub-section}{sub-section:toString_ret|trigger=none|class=sIndent}[String] -- A string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toString_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toString_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toString_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toString_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toString_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toString_sam|trigger=none}{code:language=javascript}
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toString-Number|class=node}{tr:id=name}{td}h6.toString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}toString{span}{span:id=iets|style=float: left;}\(radix){span}{td}{tr}{tr:id=des}{td}{sub-section:toString-Number_des|trigger=button|text=}{sub-section}{sub-section:toString-Number_des|trigger=none|class=sIndent}Returns a string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:toString-Number_snc|trigger=button|text=}{sub-section}{sub-section:toString-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:toString-Number_prs|trigger=button|text=}{sub-section}{sub-section:toString-Number_prs|trigger=none|class=sIndent}\{[Number]} radix -- An integer between 2 and 36 specifying the base to use for representing numeric values
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:toString-Number_ret|trigger=button|text=}{sub-section}{sub-section:toString-Number_ret|trigger=none|class=sIndent}[String] -- A string representing the specified Number object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:toString-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toString-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:toString-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toString-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:toString-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:toString-Number_sam|trigger=none}{code:language=javascript}
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
precision in fixed-point or exponential notation.
ret
Returns
sIndent A string representing the number to a specified precision in fixed-point or exponential notation.clients