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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -