This documentation is archived and is not being maintained.

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.

Show: