Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Is let keyword not supported? #47

@HeyITGuyFixIt

Description

@HeyITGuyFixIt

I passed a JavaScript file I have been working on into dukpy's evaljs and got an error. I found the offending line and did some testing and discovered that it doesn't like the let keyword. Some examples of what I used are:

let a;
let b = 5;
let c='hello world';

Each line above (which is valid JavaScript) results in this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\HPOWNE~1\DOCUME~1\CHRIST~1\projects\TDP\thea\KIVY_V~1\lib\site-packages\dukpy\evaljs.py", line 57, in evaljs
    res = _dukpy.eval_string(self, jscode, jsvars)
_dukpy.JSRuntimeError: SyntaxError: unterminated statement (line 1)
        src\pyduktape.c:1
        duk_js_compiler.c:6594

It would seem as if the let keyword is not supported. Is there a reason for that or has it simply not been added yet?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions