| 1 |
result = ""; |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var console = { |
| 7 |
debug: function(arg) { result += "DEBUG: " + arg; }, |
| 8 |
warn: function(arg) { result += "WARN: " + arg; }, |
| 9 |
error: function(arg) { result += "ERROR: " + arg; }, |
| 10 |
dir: function(arg) { result += "DIR: " + arg; } |
| 11 |
}; |
| 12 |
|
| 13 |
|
| 14 |
var notconsole = { |
| 15 |
debug: function(arg) { result += arg; }, |
| 16 |
warn: function(arg) { result += arg; } |
| 17 |
}; |
| 18 |
(function() { |
| 19 |
var variable = 'variable'; |
| 20 |
|
| 21 |
console.debug("debug here!" + variable); |
| 22 |
console.warn("warn here!"); |
| 23 |
console.error("error here!"); |
| 24 |
notconsole.debug("notconsole debug here!"); |
| 25 |
notconsole.warn("notconsole warn here!"); |
| 26 |
|
| 27 |
console.dir(notconsole); |
| 28 |
})(); |