؟: النمط (يتطلب تعبيرات على جانبي :
):
typeof(someVariable) != 'undefined' ? someFunction : null;
نمط النينجا:
someVariable !== undefined && someFunction(someVariable);
تحرير: لم أستطع اليمين الدستورية noop
كان شيئًا في JavaScript ، لكن يبدو أنني كنت مخطئًا. تحولت إلى null
]