Skip to content

Compiler issues #254

@savethekiddes

Description

@savethekiddes
array = ["oof", "lol", "test", "jip"]
for item in array:
    console.log(item)

compiles to

(function(){"use strict";function ՐՏ_Iterable(iterable){var tmp;if(iterable.constructor===[].constructor||iterable.constructor==="".constructor||(tmp=Array.prototype.slice.call(iterable)).length){return tmp||iterable}if(Set&&iterable.constructor===Set){return Array.from(iterable)}return Object.keys(iterable)}(function(){var __name__="__main__"var ՐՏitr1,ՐՏidx1;;var array,item;array=["oof","lol","test","jip"];ՐՏitr1=ՐՏ_Iterable(array);for(ՐՏidx1=0;ՐՏidx1<ՐՏitr1.length;ՐՏidx1++){item=ՐՏitr1[ՐՏidx1];console.log(item)}})();})();

Near var__name__="__main__" there's a random var (that has to be removed manually and subsituted with a comma). Any idea on why does this happen? Am I using the compiler wrong? Thanks

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