How to remove item from a JavaScript object [duplicate]

How can I remove an item from a JavaScript object?

Like this:

var test = {'red':'#FF0000', 'blue':'#0000FF'};
test.remove('blue');

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

this deletes test.blue