ENع
الدرس 02 · Typing JavaScript

Basic types

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

A type annotation labels a variable's box with the kind of value it may hold. Step through a six-line program as "Mia" goes into a string box, 12 into a number box, true into a boolean box and a list into a number[] box that grows, then watch tsc refuse the string "twelve" in a number box with error TS2322, before anything runs.

9 دقيقة9 خطوات5 أسئلةBeginner
شكل 2 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

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