On Feb 4, 2:10 pm, jemptymethod <[email protected]> wrote:
> I want to delete a couple of object properties, but first save those
> properties, then add them back after I'm done processing the object
> *without* those properties.
>
> But I can't do the following, when I log the object to the console,
> it's apparent the properties didn't get deleted, presumably because to
> do so would leave dangling references, i.e. the two vars:
>
>                     var title = '' + this.args.title;
>                     var mode = '' + this.args.mode;
>
>                     delete this.args['title'];
>                     delete this.args['mode'];

Oops, how I actually started was as follows (*without* making a copy
of the string by prepending it with an empty string)

                    var title = this.args.title;
                    var mode = this.args.mode;

                    delete this.args['title'];
                    delete this.args['mode'];

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to