You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user.name="Pete"; //Error: Cannot assign to read only property 'name'
119
+
user.name="Pete"; //مقدار داد 'name' ارور: نمیتوان به ویژگی فقطخواندنی
120
120
*/!*
121
121
```
122
122
123
-
Now no one can change the name of our user, unless they apply their own `defineProperty` to override ours.
123
+
حالا هیچکس نمیتواند اسم کاربر ما را تغییر دهد، مگر اینکه `defineProperty` خودش را برای باطل کردن توصیفکنندهی ما اعمال کند.
124
124
125
-
```smart header="Errors appear only in strict mode"
126
-
In the non-strict mode, no errors occur when writing to non-writable properties and such. But the operation still won't succeed. Flag-violating actions are just silently ignored in non-strict.
125
+
```smart header="ارورها فقط در حالت سختگیرانه ایجاد میشوند"
126
+
در حالت غیر سختگیرانه، زمانی که ویژگیهای غیر قابل نوشتن را تغییر و یا کاری مشابه انجام میدهیم اروری ایجاد نمیشود. اما همچنان این کار انجام نمیشود. در حالت غیر سختگیرانه، کارهای نقصکنندهی پرچم بی سر و صدا نادیده گرفته میشوند.
127
127
```
128
128
129
-
Here's the same example, but the property is created from scratch:
129
+
اینجا مثالی مشابه داریم اما ویژگی از اول ایجاد شده است:
130
130
131
131
```js run
132
132
let user = { };
133
133
134
134
Object.defineProperty(user, "name", {
135
135
*!*
136
136
value:"John",
137
-
//for new properties we need to explicitly list what's true
137
+
//است true برای ویژگیهای جدید ما باید به طور واضح لیست کنیم که چه چیزی
0 commit comments