1.8 KiB
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