Console.log: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 9: | Line 9: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
|console.assert(expression, object) || | |console.assert(expression, object) || | ||
|- | |- | ||
|console.clear() || | |console.clear() || | ||
|- | |- | ||
|console.count(label) || | |console.count(label) || | ||
|- | |- | ||
|console.debug(object [, object, ...]) || | |console.debug(object [, object, ...]) || | ||
|- | |- | ||
|console.dir(object) || | |console.dir(object) || | ||
|- | |- | ||
|console.dirxml(object) || | |console.dirxml(object) || | ||
|- | |- | ||
|console.error(object [, object, ...]) || | |console.error(object [, object, ...]) || | ||
|- | |- | ||
|console.group(object[, object, ...]) || | |console.group(object[, object, ...]) || | ||
|- | |- | ||
|console.groupCollapsed(object[, object, ...]) || | |console.groupCollapsed(object[, object, ...]) || | ||
|- | |- | ||
|console.groupEnd() || | |console.groupEnd() || | ||
|- | |- | ||
|console.info(object [, object, ...]) || | |console.info(object [, object, ...]) || | ||
|- | |- | ||
|console.log(object [, object, ...]) || | |console.log(object [, object, ...]) || | ||
|- | |- | ||
|console.profile([label]) || | |console.profile([label]) || | ||
|- | |- | ||
|console.profileEnd() || | |console.profileEnd() || | ||
|- | |- | ||
|console.time(label) || | |console.time(label) || | ||
|- | |- | ||
|console.timeEnd(label) || | |console.timeEnd(label) || | ||
|- | |- | ||
|console.timeStamp([label]) || | |console.timeStamp([label]) || | ||
|- | |- | ||
|console.trace() || | |console.trace() || | ||
|- | |- | ||
|console.warn(object [, object, ...]) || | |console.warn(object [, object, ...]) || | ||
|} | |} | ||
Line 53: | Line 53: | ||
Rem console.log | Rem console.log | ||
ChangeForm(Form2) | |||
'go to next form without transition | |||
Function Form1_onhide() | |||
MsgBox "Old Form Hidden" | |||
End Function | |||
Function Form2_onshow() | |||
Msgbox "Show form " & NSBCurrentForm.id | |||
End Function | |||
</pre> | </pre> | ||
== Example (JavaScript) == | == Example (JavaScript) == | ||
<pre> | <pre> | ||
// | //ChangeForm sample call | ||
ChangeForm(Form2); | |||
//go to next form without transition | |||
Form1.onhide = function() { | |||
alert("Old Form Hidden"); | |||
} | |||
Form2.onshow = function() { | |||
alert("Show form " + NSBCurrentForm.id); | |||
} | |||
</pre> | </pre> | ||
== Output == | == Output == | ||
( | (msgbox showing "Old Form Hidden") | ||
(msgbox showing "Show form Form2") | |||
== Related Items == | == Related Items == | ||
Line 76: | Line 93: | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Statements - | [[Category:Statements - Flow of control]] |
Revision as of 11:20, 8 October 2013
console.log(message)
Description
Console.log outputs text to the debugger's console. If you run your app with the debugger's console window open, you can see the message as your program runs. This is useful for tracing program execution, checking variable's value during execution and for timing.
Here are related console commands:
console.assert(expression, object) | |
console.clear() | |
console.count(label) | |
console.debug(object [, object, ...]) | |
console.dir(object) | |
console.dirxml(object) | |
console.error(object [, object, ...]) | |
console.group(object[, object, ...]) | |
console.groupCollapsed(object[, object, ...]) | |
console.groupEnd() | |
console.info(object [, object, ...]) | |
console.log(object [, object, ...]) | |
console.profile([label]) | |
console.profileEnd() | |
console.time(label) | |
console.timeEnd(label) | |
console.timeStamp([label]) | |
console.trace() | |
console.warn(object [, object, ...]) |
Example (Basic)
Rem console.log ChangeForm(Form2) 'go to next form without transition Function Form1_onhide() MsgBox "Old Form Hidden" End Function Function Form2_onshow() Msgbox "Show form " & NSBCurrentForm.id End Function
Example (JavaScript)
//ChangeForm sample call ChangeForm(Form2); //go to next form without transition Form1.onhide = function() { alert("Old Form Hidden"); } Form2.onshow = function() { alert("Show form " + NSBCurrentForm.id); }
Output
(msgbox showing "Old Form Hidden")
(msgbox showing "Show form Form2")