Forum Discussion
rraghvani
10 months agoChampion Level 3
That's look good. You could also move the switch statement within the for loop, e.g.
for (const [key, value] of arObj) {
if (value.Exists && value.Visible == true) {
switch (key):
case "plugin1":
// code
break;
case "plugin2":
// code
break;
default:
// error
}
}
Ensure the code can be maintainable, and other testers can understand it.
Related Content
- 8 years ago
- 4 years ago
- 12 years ago
- 11 years ago
- 2 years ago