It is not a jQuery feature but a feature for debugging purposes used by developers. It is used to writes a message to the console.

console.log() accepts a parameter which can be an object, an array or any message.

Syntax : console.log(name); // here name is object, an array or variable.



$('#form').submit(function() {
     console.log(‘Your form is submitted successfully!’);
     // do something

Suggest An Answer