This function retrieves the type name of an arbitrary expression. In particular, for objects it returns the name of the defining class.
The function has the following syntax:
typeName(val)
The function returns a string holding the type name of the passed value. For simple types, it returns one of the following strings:
For objects, it returns the name of the defining class.
Defines the expression.
Example
Get the type of some expressions:
? typeName(19) // number d = new Date; ? typeName(d) // Date a = ["a","b","c"]; ? typeName(a) // Array ? typeName(a[0])// string
Copyright © 2013 CA. All rights reserved. |
|