javascript - What is console.log in jQuery? -


possible duplicate:
what console.log used in jquery?

what console.log? used in jquery?

jquery , console.log unrelated entities, although useful when used together.

if use browser's built-in dev tools, console.log log information object being passed log function.

if console not active, logging not work, , may break script. check console exists before logging:

if (window.console) console.log('foo'); 

the shortcut form of might seen instead:

window.console&&console.log('foo'); 

there other useful debugging functions well, such debug, dir , error. firebug's wiki lists available functions in console api.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -