PhineX Masterclass
The Ultimate Logic Workshop
/* --- ابدأ التحدي الشامل هنا --- */ // 1. عرف المصفوفة والمحفظة const gamePrices = [50, 120, 200, 80]; const myWallet = 100; // 2. ابدأ بناء "آلة" الخصم (Function) function applyDiscount(price) { return price * 0.8; } // 3. استخدم الحلقة والمنطق للطباعة const log = (msg) => document.getElementById('output').innerHTML += msg + "
"; document.getElementById('output').innerHTML = "Running System...
"; for (let i = 0; i < gamePrices.length; i++) { let finalPrice = applyDiscount(gamePrices[i]); // أكمل كود الـ if هنا للتحقق من السعر مقابل المحفظة }
// بانتظار تشغيل المحرك...