Starlit Daily

📚 › JavaScript: make pages do things

10. Objects

ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.

An object groups related values under named keys: {name: "Nadia", marks: 88}. Read a value with a dot, as student.name, or with brackets, as student["name"].

Objects describe one thing; arrays hold many things of one kind.

عرض المثال

const student = {name: "Nadia", marks: 88};
console.log(student.name, student.marks);

✍️ دورك الآن

Create an object with country set to Bangladesh and print the country.

← العودة إلى الدورة