The console
object in JavaScript supports placeholders like %s
, %d
, and %o
for formatted output. These placeholders allow you to format and display data in the console in a more readable way.
Example:
let name = 'Alice';
let age = 25;
console.log('Name: %s, Age: %d', name, age); // Output: 'Name: Alice, Age: 25'
Tags: intermediate, JavaScript, Console