1var enumNames=[];
2for (var log in LogEntry) {
3 if (isNaN(Number(log))) {
4 enumNames.push(log);
5 }
6}
7console.log(enumNames);
8
9//Output
10//["ERROR", "WARN", "INFO", "DEBUG"]
11
1var enumValues=[];
2for (var log in LogEntry) {
3 if (!isNaN(Number(log))) {
4 enumValues.push(log);
5 }
6}
7console.log(enumValues);
8
9//Output
10//["0", "1", "2", "3"]
11