Created
January 5, 2012 19:02
console.log - appcelerator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({ | |
backgroundColor:'#ccc' | |
}); | |
var console = { | |
log:function(){ | |
var len = arguments.length; | |
var log = ''; | |
for(var i = 0; i < len; i++){ | |
var type = typeof(arguments[i]); | |
if(type == 'object' || type == 'array'){ | |
log += ' '+JSON.stringify(arguments[i]); | |
} | |
if(type == 'string'){ | |
log += ' '+arguments[i]; | |
} | |
} | |
Ti.API.info(log); | |
} | |
} | |
console.log({sdf:"df"}, [1,3,5,6], "sdfsdf"); | |
win.open(); |
skypanther
commented
Jan 5, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment