P3.6: JS Objects & JSON Data

Objects store key-value properties representing structured entities.


1. Object Syntax

const user = {
  name: "Rohan",
  skills: ["HTML", "JS"],
  greet: function() { console.log("Hello!"); }
};
console.log(user.name); // Rohan

🎓 Practice Assignment Tasks

  • Create an object representing a book with title, author, and isRead properties.
  • Convert it to a JSON string using `JSON.stringify()` and log it.
Stuck? Hints available
// Write your JavaScript logic here
// Click 'Run Code' to see console outputs below
🔒 Code requirements not met yet. Complete the tasks above.
🔒 Complete the Practice Assignment above to unlock completion.
Advertisement
NS
Ask Nextsem
AI Mode
NS
Home
Course
Playground