console.table javascript 1

console.table javascript

  //object in table
console.table({
        firstname: "Kinjal",
        lastname: "Suryavanshi"
    });
//array in table
    console.table(['graps','apple','orange']);

Here is what the above code is Doing:
1. console.log() is used to print the output to the console.
2. console.error() is used to print the error message to the console.
3. console.warn() is used to print the warning message to the console.
4. console.clear() is used to clear the console.
5. console.time() and console.timeEnd() is used to calculate the time taken by a block or a function, to execute.
6. console.group() and console.groupEnd() is used to group contents in a separate block, which will be indented.
7. console.count() is used to count the number that the function hit by this counting method.
8. console.assert() is used to write some message when the first argument is false.
9. console.table() is used to generate a table inside a console.

Similar Posts