Bird
0
0

What does console.table() do in Node.js?

easy📝 Conceptual Q2 of 15
Node.js - Debugging and Profiling
What does console.table() do in Node.js?
APrints data as JSON string
BPrints data as plain text
CPrints data as a formatted table
DPrints data as a list
Step-by-Step Solution
Solution:
  1. Step 1: Identify console.table() purpose

    console.table() displays arrays or objects in a neat table format, making data easier to read.
  2. Step 2: Compare with other output formats

    Plain text is console.log(), JSON string requires JSON.stringify(), and list is not a specific console method.
  3. Final Answer:

    Prints data as a formatted table -> Option C
  4. Quick Check:

    console.table() = formatted table output [OK]
Quick Trick: Use console.table() for clear tabular data display [OK]
Common Mistakes:
  • Thinking console.table() prints JSON
  • Using console.log() expecting table format
  • Confusing with console.dir()

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes