ENع
الدرس 16 · How JavaScript really works

Errors and exceptions

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

When something goes wrong, JavaScript code can throw: the running function stops at once and an Error object travels down the call stack until a try block catches it, or the script stops. Follow thirteen real lines, root.js, as root(9) returns normally, root(-4) throws a RangeError, catch prints it, and finally runs last.

12 دقيقة11 خطوات5 أسئلةIntermediate
شكل 16 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.