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

j is out of scope here #47

Open
khill-fbmc opened this issue Aug 7, 2024 · 3 comments
Open

j is out of scope here #47

khill-fbmc opened this issue Aug 7, 2024 · 3 comments

Comments

@khill-fbmc
Copy link

Is it supposed to be in the for loop a few lines up?

i = i + j - 1;

@hayes
Copy link
Contributor

hayes commented Aug 7, 2024

var isn't scoped to blocks like let/const, so this declaration should be available until the end of the function

@khill-fbmc
Copy link
Author

Well today I learned :)

I haphazardly threw your code in ChatGPT and asked it to make it Typescript. I kinda like going through and hunting the things that need "fixing" once I change js to ts

I'm here in your repo from https://github.com/stephenplusplus/jsonl which uses it as a dependency

@hayes
Copy link
Contributor

hayes commented Aug 8, 2024

not my code! just happened to have github notifications enabled for this repo from a very long time ago

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

2 participants