freeCodeCamp/guide/arabic/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator/index.md
2019-06-20 16:05:02 -05:00

414 B

title localeTitle
Use the Conditional (Ternary) Operator استخدم المشغل الشرطي (الثالوثي)

استخدم المشغل الشرطي (الثالوثي)

تلميح 1

استخدم المشغل الثلاثي للتحقق من المساواة.

تحذير حل قدما!

function checkEqual(a, b) {
  return (a = b ? true : false );
}

checkEqual(1, 2);