What is a property in JavaScript objects?

  • A value associated with an element in an array
  • A key-value pair associated with an object
  • A function that performs an action
  • A variable declaration
A property in JavaScript objects is a key-value pair associated with an object. The key is a string (or Symbol), and the value can be of any data type. Properties allow you to store data and functions within an object, making it a fundamental concept in JavaScript's object-oriented programming.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *