which accessor creates a read-only property? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

which accessor creates a read-only property?

Dear "SOLOLEARN" I answer this question but your answer is'nt correct! the answer is get but your answer is set.

29th Jan 2019, 12:06 PM
fatemeh
1 ответ
0
Hi, the get accessor allows to read the property but it doesn't guarantee that one cannot set it. So, only the set accessor can handle the writing attempts and reject them.
30th Jan 2019, 12:01 AM
Étienne Durup
Étienne Durup - avatar