Yo.utils.undef
Use this function to test whether an object is undefined.
Prerequisites
The following command to load the appropriate version of the Rapid+JS Library must precede the use of this function on the page. Specify your own site key:
<script src="https://rapid-cdn.yottaa.com/rapid/lib/sitekey.js"></script>
Syntax
Yo.utils.undef(object)
Returns
True if the object is not defined. False if the object is defined.
Parameters
Parameter |
Description |
---|---|
object |
Specifies the object whose existence will be tested. |
Example
The first statement in this example tests whether parameter1
is undefined. It is, so the function returns true
. The next statement defines parameter1
as a variable and sets its value to 'bob'. The last statement tests whether parameter1
is undefined, and returns false
.
Yo.utils.undef(parameter1); var parameter1 = 'bob'; Yo.utils.undef(parameter1);