Javascript Global Functions

From Yate Documentation
Revision as of 16:56, 10 September 2013 by Paulc (Talk | contribs)

Jump to: navigation, search

These functions exist in the global context and can be called from anywhere.

  • isNan(arg)

This function checks if arg is a number or not.

Returns true if arg is not a number, false if it's a valid number.

  • parseInt(str)

Converts a string str to a number using the default numbering base 10.

Obeys usual programming conventions:

  • Strings starting with 0x are hexadecimal
  • Strings starting with 0 are octal
  • All other strings are assumed decimal

Returns a number or zero if str was not parsable.

  • parseInt(str,base)

Converts a string str to a number using a specific numbering base.

Base must be between 2 and 36.

Returns a number or zero if str was not parsable in numbering base.

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers