QuestenaPractice that shows what to review next
Question 65

A new ordinary object is stored in person. The program executes person.name = "Ada" under normal writable conditions. What changes?

  1. person gains an own name property containing AdaCorrect answer
  2. A local variable named name is created
  3. The property is added only to person's prototype
  4. Nothing changes because missing properties cannot be assigned

Explanation

Ordinary assignment through a previously absent name creates that name as an own property and stores the supplied value. It does not create a separate local binding named name, because the assignment target is a property access.

Continue with this test

Start practice
Question 65: A new ordinary object is stored in person. The program… · JavaScript Fundamentals · Questena