Because I'm not sure what you know or don't know, so I'll try to explain every line:
var convArrToObj = function(array){
defines a function with a single parameter, array
.
var thisEleObj = new Object();
initializes a new object using a constructor function. var thisEleObj = {};
also works.
if(typeof array == "object"){
ensures that the input is an array or an object. It's not strictly necessary if you know that the input will be an array or an object and that you will not need recursion (see line 5).
for(var i in array){
loops through each "key" in the object. In an array, the keys are all numerical and in numerical order, so for(var i=0;i<array.length;i++){
would be a similar version that only supports arrays.
var thisEle = convArrToObj(array[i]);
This is the clever part, and likely the most unclear. It checks if the target property of the object (or index of the array) is an array itself, and copies it as an object if so.
thisEleObj[i]=thisEle
is the part that "gets everything done" by copying thisEle
(the converted array) to the array.
else { thisEleObj=array}
doesn't bother to process datatypes like numbers (who usually don't have properties) or functions (who have properties that should not be processed)
return thisEleObj
outputs the processed object to an assignment/another function/another call of itself due to recursion.
Hope this helped, tell me if there's anything I need to clarify.