You do not need to write a function, you can use indexOf() and splice() these two functions.
You can remove any positional element a element.
For example:
var name = ['james' , 'tommy' , 'Jimmy' , 'Holon'];
var name = name.splice(name.indexOf('Jimmy') , 1);