File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
1-js/02-first-steps/12-nullish-coalescing-operator Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -157,14 +157,14 @@ alert(x); // 2
157
157
158
158
## ملخص
159
159
160
- - The nullish coalescing operator ` ?? ` provides a short way to choose the first "defined" value from a list .
160
+ - يوفر المشغل الفارغ المتحد ` ?? ` طريقة قصيرة لاختيار القيمة "المحددة" الأولى من قائمة .
161
161
162
- يستخدم لوضع قيم افتراضية للمتغيرات:
162
+ يستخدم لوضع قيم افتراضية للمتغيرات:
163
163
164
- ` ` ` js
165
- // اجعل height=100 إذا كان null أو undefined
166
- height = height ?? 100 ;
167
- ` ` `
164
+ ` ` ` js
165
+ // اجعل height=100 إذا كان null أو undefined
166
+ height = height ?? 100 ;
167
+ ` ` `
168
168
169
- - The operator ` ?? ` has a very low precedence, only a bit higher than ` ? ` and ` = ` , so consider adding parentheses when using it in an expression .
170
- - It's forbidden to use it with ` || ` or ` && ` without explicit parentheses .
169
+ - يحتوي المشغل ` ?? ` على أولوية منخفضة جدًا ، فقط قليلًا أعلى من ` ؟ ` و ` = ` ، لذلك يجب عليك النظر في إضافة الأقواس عند استخدامه في تعبير .
170
+ - يحظر استخدامه مع ` || ` أو ` && ` بدون أقواس صريحة .
You can’t perform that action at this time.
0 commit comments