Q: JS remove element from array with no gap var myList = [];
myList.push({ololo: "ololo0"});
myList.push({ololo: "ololo1"});
myList.push({ololo: "ololo2"});
console.log(myList);

Result:
[Object { ololo="ololo0"}, Object { ololo="ololo1"}, Object { ololo="ololo2"}]

Question: How do I delete the second (myList[1]) element with no gap where it was?
I.e this:
myList[0] = {ololo: "ololo0"}
myList[1] = {ololo: "ololo1"}
myList[2] = {ololo: "ololo2"}

Should be:
myList[0] = {ololo: "ololo0"}
myList[1] = {ololo: "ololo2"}


A: you can use Splice
http://viralpatel.net/blogs/javascript-array-remove-element-js-array-delete-element/
you can use this function below
function removeByIndex(arr, index) {
   arr.splice(index, 1);
}

here's how to use it
   var mynewArray =  removeByIndex(myList,1);


A: Try this:
Delete wont do the trick. But Array.splice will do the trick.
myList.splice(index, 1)

A: var myList = [];
myList.push({ololo: "ololo0"});
myList.push({ololo: "ololo1"});
myList.push({ololo: "ololo2"});
console.log(myList);

console.log(remove(myList,1));


function remove(arr, index){
    arr.splice(index,1);
    return arr;
}

Working Example http://jsfiddle.net/qzFuj/

A: Use splice:

array.splice(index , howMany[, element1[, ...[, elementN]]])
Changes the content of an array, adding new elements while removing
  old elements.

For removing the second element: myList.splice(1, 1).

A: Here is what you Expect and what you want
if you use splice it suits you
var myList = [];
myList.push({ololo: "ololo0"});
myList.push({ololo: "ololo1"});
myList.push({ololo: "ololo2"});

  ///////////////////////splice IS APPLIED////////////////////////////
    myList.splice(0, 1)
  ///////////////////////////////////////////////////////////////////

console.log(myList);

output (note that index 0 is completely Removed!)
[Object { ololo=

"ololo1"

}, 
Object { ololo=

"ololo2"

}]

if you use delete ,it wont suite you ! here is what it looks!
  var myList = [];
    myList.push({ololo: "ololo0"});
    myList.push({ololo: "ololo1"});
    myList.push({ololo: "ololo2"});

  ////////////////DELETE IS APPLIED///////////////////////////////////
    delete myList[0]
 ////////////////////////////////////////////////////////////////////

    console.log(myList);

output : (mainly look on undefined at index 0)
    [

    undefined

    , Object { ololo=

    "ololo1"

    }, Object { ololo=

    "ololo2"

    }]

