Whats the quickest way to get rid of all the properties of a an object in javascript?
Posted
by Shaun
on Stack Overflow
See other posts from Stack Overflow
or by Shaun
Published on 2010-04-01T14:38:11Z
Indexed on
2010/04/01
14:43 UTC
Read the original article
Hit count: 234
JavaScript
I have an on object like so
var obj = {};
function set()
{
obj.x1 = 20;
obj.y1 = 35;
obj.x2 = 60;
obj.y2 = 55;
...
}
Whats the quickest way to delete/reset all of the properties of obj?
© Stack Overflow or respective owner