Simplify forEach loops in JavaScript

See https://stackoverflow.com/a/9329476
This commit is contained in:
Sebastian Serth
2023-12-21 17:14:22 +01:00
committed by Sebastian Serth
parent d9381657f7
commit e2c8156f0e
2 changed files with 6 additions and 10 deletions

View File

@ -586,10 +586,7 @@ var CodeOceanEditor = {
return map;
}, {});
for (let severity in severity_groups) {
if (!severity_groups.hasOwnProperty(severity)) {
continue;
}
for (const severity of severity_groups) {
const linter_results = severity_groups[severity]
const li = document.createElement("li");
@ -599,7 +596,7 @@ var CodeOceanEditor = {
const sub_ul = document.createElement("ul");
sub_ul.setAttribute('class', 'inline_list');
for (let check_run of linter_results) {
for (const check_run of linter_results) {
const sub_li = document.createElement("li");
let scope = '';