{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla/rhino/issues/445","repository_url":"https://api.github.com/repos/mozilla/rhino","labels_url":"https://api.github.com/repos/mozilla/rhino/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/rhino/issues/445/comments","events_url":"https://api.github.com/repos/mozilla/rhino/issues/445/events","html_url":"https://github.com/mozilla/rhino/issues/445","id":328016709,"node_id":"MDU6SXNzdWUzMjgwMTY3MDk=","number":445,"title":"Rhino '1.7.9' Issue with \"let\"","user":{"login":"itaishalom","id":9066121,"node_id":"MDQ6VXNlcjkwNjYxMjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9066121?v=4","gravatar_id":"","url":"https://api.github.com/users/itaishalom","html_url":"https://github.com/itaishalom","followers_url":"https://api.github.com/users/itaishalom/followers","following_url":"https://api.github.com/users/itaishalom/following{/other_user}","gists_url":"https://api.github.com/users/itaishalom/gists{/gist_id}","starred_url":"https://api.github.com/users/itaishalom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itaishalom/subscriptions","organizations_url":"https://api.github.com/users/itaishalom/orgs","repos_url":"https://api.github.com/users/itaishalom/repos","events_url":"https://api.github.com/users/itaishalom/events{/privacy}","received_events_url":"https://api.github.com/users/itaishalom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-31T07:00:04Z","updated_at":"2018-06-03T06:39:34Z","closed_at":"2018-06-03T06:39:34Z","author_association":"NONE","body":"Hi all, every time I try to evaluate function that contains let statment I get \"missing ; before statement\" but as I switch the let to var it works fine:\r\n\r\n```\r\n String script2 = \"function letTest() { \\n\" +\r\n                \"    let x = 31; \\n\" +\r\n                \"    if (true) { \\n\" +\r\n                \"        let x = 71; \\n\" +\r\n                \"        print(x); \\n\" +\r\n                \"    } \\n\" +\r\n                \"    print(x); \\n\" +\r\n                \"} \";\r\n        Context rhino = Context.enter();\r\n\r\n        //disabling the optimizer to better support Android.\r\n        rhino.setOptimizationLevel(-1);\r\n\r\n        try {\r\n\r\n            ScriptableObject scope = rhino.initStandardObjects();\r\n\r\n            Object[] functionParams = new Object[]{null};\r\n\r\n\r\n            rhino.evaluateString(scope, script2, \"JavaScript\", 1, null); -->> causes exception\r\n```"}}
{"actor":{"display_login":"itaishalom"}}