related codes
//
for (var i = 0,l = res.length; i < l; iPP) {
if (res[i].intIsDel === 1) {
res[i]["disabled"] = true res[i]["strName"] = res[i]["strName"] + " " + "()"
}
for (var j = 0; j < res[i].listThemeChildren.length; jPP) {
if (res[i].listThemeChildren[j].intIsDel === 1) {
res[i].listThemeChildren[j]["disabled"] = true res[i].listThemeChildren[j]["strName"] = res[i].listThemeChildren[j]["strName"] + " " + "()"
}
for (var r = 0; r < res[i].listThemeChildren.length; rPP) {
if (res[i].listThemeChildren[j].listThemeChildren[r].intIsDel === 1) {
res[i].listThemeChildren[j].listThemeChildren[r]["disabled"] = true res[i].listThemeChildren[j].listThemeChildren[r]["strName"] = res[i].listThemeChildren[j].listThemeChildren[r]["strName"] + " " + "()"
}
}
}
}
problem description
feel that the for loop is too troublesome, think simply,
how to optimize this, recursion? how to write