Partager via


Number.format Function

Formats a number by using the invariant culture.

var a = numberVar.format(format);

Arguments

  • format
    A format string.

Return Value

A string that contains the formatted number value.

Exceptions

Exception type

Condition

Sys.ArgumentException

format is invalid.

Remarks

Use the format method to replace the Number object value with a culture-independent text representation that is based on the format parameter. The invariant culture is based on the "en-US" culture, but uses a different currency symbol.

See Also

Reference

Number Type Extensions

Other Resources

Language Reference