hi there.
anyone can help me to complete this
3. The following Javascript function, while grammatically correct, is sometimes unreliable. It is to be deprecated and you have been tasked to create a new function. It should accept an array parameter and assign each element in the array value to the supplied input value. If input array is a multi dimensional array it should reset the children elements as well.
function myresetter_func (counter, arr1, str)
{
i = q = counter = 0;
temp = arr1;
for (var i=0;i<temp.length;i++){
if(temp[i].length > 0)
{
for (q=0;q<temp[i].length;q++)
{
temp[i][q] = str;
}
} else
temp[i] = str;
}
return temp;
}