Possible Duplicate:
Delete an array key when it contains a string in javascript
by using jquery, underscore or native javaScript I would like to delete or add element to an array.
here is my code;
var a = ['4', '5'];
var remove = false/true;
if(!remove) {
a.push('6'); // it works
} else {
a.remove(5); // I have no idea how to perform this in a very dry way
}