Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
JS5041: The property can only be assigned to
Collapse the table of content
Expand the table of content

JS5041: The property can only be assigned to

The code reads the value of a write-only property. This is not allowed because code cannot read values from write-only identifiers.

A function set statement without a matching function get statement defines a write-only property.

To correct this error

  1. Make sure the code does not read from a write-only property.

  2. Add a matching function get statement to the property to make it readable.

Community Additions

ADD
Show:
© 2015 Microsoft