InterviewHubPRO
Section Overview
Q375

Question 375 of 521

Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

72%
JavaScript Internals (521 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

What are the placeholders from console object

Below are the list of placeholders available from console object,

  1. %o — It takes an object,
  2. %s — It takes a string,
  3. %d — It is used for a decimal or integer These placeholders can be represented in the console.log as below
javascript
  const user = { name: "John", id: 1, city: "Delhi" };
  console.log(
    "Hello %s, your details %o are available in the object form",
    "John",
    user
  ); // Hello John, your details {name: "John", id: 1, city: "Delhi"} are available in object