×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which is the correct syntax to access an object property in JavaScript?

48. Which is the correct syntax to access an object property in JavaScript?

  1. objectName:propertyName
  2. propertyName
  3. objectName["propertyName"]
  4. Both B. and C.

Answer: D) Both B. and C.

Explanation:

The properties of an object can we accessed using either objectName.propertyName or objectName["propertyName"].

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.