Question: I have an object which has duplicate values so i used delete new\_object[1] to delete the value but when I see this in console its showing undefined in object 0800

```
["293", undefined, "298", "297"]

```

Answer: 
You should use

```
arr.splice(index, 1);

```

`delete` only removes the element, but keeps the indexes. [This question](https://stackoverflow.com/questions/5767325/remove-a-particular-element-from-an-array-in-javascript) is similar in nature and provides more information.
var test = [1,2,3,4];

delete test[1];

now if you print the test variable, you will get

=> [ 1, , 3, 4 ]
================

that is why you have got undefined

like everyone here is answering, you should use splice

test.splice(1,1);

and now print the test variable will give you

=> [ 1, 3, 4, 5 ]
=================