50%(2)1 out of 2 people found this document helpful
This preview shows page 1 - 4 out of 12 pages.
CENG 256 Internet Programming LAB 3 This lab does not have to be uploaded.
To delete a property you use the special keyword “delete”. For example, to delete the “convertible field” from the Hyundai object we created simply put : delete hyundai.convertible; This will not just delete the value, but the property itself. Note if you try to access the property you will simply get “undefined”. Delete returns trueonce if the property was deleted successfully or if it doesn’t exist in the object. It will return false only if it cannot delete the property which could happen if it is a protected object by the browser. Part 5: