KubeJS

KubeJS

61M Downloads

forin loop syntax error

SwanX1 opened this issue ยท 1 comments

commented

Not sure if this is a KubeJS error, or a Rhino error, but running the following code (or something similar) doesn't work:

let testobject = {
  a: 'bc',
  foo: 'bar'
};
for (const key in testobject) {
  console.log(key);
}

throws a syntax error on line 5, however if the const is replaced with var, it works fine.

commented