Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js/php Scope #31

Open
zaoqi opened this issue May 19, 2019 · 0 comments
Open

js/php Scope #31

zaoqi opened this issue May 19, 2019 · 0 comments

Comments

@zaoqi
Copy link

zaoqi commented May 19, 2019

$ node
> function a(){
... if(true){
..... var a=0;
..... }
... return a;
... }
undefined
> a()
0

but

https://jarble.github.io/transpiler/javascript/js_transpiler/test_parser.html#%7B%22inputText%22%3A%22function%20a()%7B%5Cnif(true)%7B%5Cnvar%20a%3D0%3B%5Cn%7D%5Cnreturn%20a%3B%5Cn%7D%22%2C%22inputLang%22%3A%22javascript%22%2C%22outputLang%22%3A%22go%22%7D

uncaught exception: var_type "Object" is not defined for go
@zaoqi zaoqi changed the title js Scope js/php Scope May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant