freeCodeCamp/curriculum/challenges/arabic/02-javascript-algorithms-an.../basic-javascript/create-decimal-numbers-with...

1.8 KiB

id title challengeType videoUrl localeTitle
cf1391c1c11feddfaeb4bdef Create Decimal Numbers with JavaScript 1 قم بإنشاء أرقام عشرية باستخدام جافا سكريبت

Description

يمكننا تخزين الأرقام العشرية في المتغيرات أيضًا. ويشار إلى الأرقام العشرية في بعض الأحيان باسم أرقام النقطة العائمة أو العوامات . ملحوظة
لا يمكن تمثيل جميع الأرقام الحقيقية بدقة في نقطة عائمة . هذا يمكن أن يؤدي إلى أخطاء التقريب. التفاصيل هنا .

Instructions

إنشاء متغير myDecimal وإعطائه قيمة عشرية مع جزء كسري (على سبيل المثال 5.7 ).

Tests

tests:
  - text: يجب أن يكون <code>myDecimal</code> رقمًا.
    testString: 'assert(typeof myDecimal === "number", "<code>myDecimal</code> should be a number.");'
  - text: <code>myDecimal</code> يجب أن يكون لديك <code>myDecimal</code> العشرية
    testString: 'assert(myDecimal % 1 != 0, "<code>myDecimal</code> should have a decimal point"); '

Challenge Seed

var ourDecimal = 5.7;

// Only change code below this line

After Test

console.info('after the test');

Solution

// solution required