Hey there! I've developed a function that's supposed to take an array of Student details and display it, but for some reason, it isn't working correctly. Any ideas on what might be causing this issue? Your help is greatly appreciated!
function displayData(stdDetails) {
for (var t in stdDetails) //printing keys along with values
{
console.log("in loop");
console.log(t, ":", stdDetails[t]);
if (typeof(stdDetails[t]) == 'object') {
displayData(stdDetails[t]);
}
}
}
displayData();