In principle, JavaScript is also a prototype-based language where new objects can be created from existing objects, but in practice this is probably one of its weakest areas. In a prototype language, ...
Javascript objects are dynamic and assigning to a property that doesn't exist is another way of creating it. So after the assignment Points[i] has its very own z property and no longer makes use of ...