Questenaتمرینی که نشان می‌دهد بعد چه چیزی را مرور کنید
سؤال 96

A for loop declares let i in its initialization. Which scope owns that i binding?

  1. The whole program
  2. The nearest function regardless of nested blocks
  3. The surrounding block even after the loop finishes
  4. The for loop itselfپاسخ درست

توضیح

A let binding introduced by the for initializer is scoped to that loop, including the loop body where appropriate. It does not become a binding of the surrounding block after the loop ends, and no closure-timing premise is needed here.

ادامهٔ این آزمون

شروع تمرین
سؤال 96: A for loop declares let i in its initialization. Which… · JavaScript Fundamentals · Questena