Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Message output handler. |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
uOut(sMsg_aMsg, oSelf, cOut); |
Parameters
Parameter | Type | Mandatory | Description | Util.js version | ||||
---|---|---|---|---|---|---|---|---|
sMsg_aMsg | String Array of String | ![]() | The message to output – either a single string or an array of strings. | 0.8 | ||||
oSelf | Self Descriptor Object | ![]() | Optional descriptor object, used to create a prefix to the message before it is output. Example object: | 0.8 | ||||
cOut | Constant | ![]() | Constant defining desired output destination:
Default: | 0.8 |
Return value
The return value of the output method will be returned (see documentation for OUT_*
constants above for more information).
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
var self = {file: "foo.js", ver: 1.2}; function bar() { uOut("bar() called", self, OUT_CONSOLE); } bar(); // "[foo.js v1.2] bar() called" |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
function foo() { var names = ["bob", "jim", "kate"]; uOut(names); } foo(); // outputs each of the names on a new line to OUT_DEFAULT |
Div | ||
---|---|---|
| ||
AvailabilityThis feature requires:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles:
Related APIs: |