Skip to main content

getNumber

Retrieves a numeric value of the specified property in the object.

Signature​

getNumber(object: {} | undefined, property: string, default?: number): number

Parameters​

NameTypeOptionalDescription
object{} | undefinedNoReference to the object.
propertystringNoName of the property.
defaultnumberYesSpecifies the default value.

Return value​

Returns the value of the property.