JavaScript console.log

JavaScript console is used to log  string , number , array , object , prototype etc. in browser console

Example

Output

output of console.log

 log object in console

First we create own custom object is not necessary to create own custom object

Example

Output

object in console

log array in console

Example

Output

array in console

Tips - The second method of JavaScript console.log  to use debugging javaScript code

We use console.log method to debugging for loop counter

Example

Output

console.log debugging

The most commanly use of console method  in javascript is console.log  and you are free to use any where console.log in method in javascript