URL: http://github.com/javascript-tutorial/fa.javascript.info/pull/53.patch
ر میکند */!* alert(x); // 2 ``` -## Summary +## چکیده -- The nullish coalescing operator `??` provides a short way to choose a "defined" value from the list. +- عملگر nullish coalescing `??` یک راه سریع برای مشخص کردن عبارت "تعریف شده (defined)" از یک لیست به کار میرود. - It's used to assign default values to variables: + از آن برای تعیین کردن مقدار پیشفرض برای متغیرها استفاده میشود: - ```js - // set height=100, if height is null or undefined - height = height ?? 100; - ``` + ```js + // ست کردن height به 100, اگر برابر null یا undefined باشد + height = height ?? 100; + ``` -- The operator `??` has a very low precedence, a bit higher than `?` and `=`. -- It's forbidden to use it with `||` or `&&` without explicit parentheses. +- عملگر `??` ترتیب اولویت پایینی دارد, البته بیشتر از `?` و `=`. +- به کار بردن آن با `||` یا `&&` بدون به کار بردن پرانتز ممنوع است.Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: