How to remove item from a JavaScript object [duplicate]

How to remove item from a JavaScript object [duplicate]

Possible Duplicate:
How to remove a property from a javascript object

How can I remove an item from a JavaScript object?
Like this:
var test = {‘red’:’#FF0000′, ‘blue’:’#0000FF’};
test.remove(‘blue’);

Solutions/Answers:

Solution 1:

var test = {'red':'#FF0000', 'blue':'#0000FF'};
delete test.blue; // or use => delete test['blue'];
console.log(test);

this deletes test.blue