...

View Full Version : Deleting object props



codegoboom
08-23-2004, 03:55 AM
var object = {message:"Hello World!"};

If I say object.message = null, or object.message = undefined, it still returns true for object.hasOwnProperty("message")

can "message" be deleted?

codegoboom
08-23-2004, 04:31 AM
I found the answer with a forum search...

delete object.message; :)


...will search first next time!

jbot
08-23-2004, 11:41 PM
I found the answer with a forum search...

good for you
:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum