-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feedback #1
Feedback #1
Conversation
Helon, my prompt sync console is running again when I am typing (before I press enter). I also would like to request to only accept numbers, but the code below is not working: while (!Number.isNaN(a)) { |
I think an You should also declare a with either Will clone and look at the rest in a bit! |
the variables are declared at the top. i will try to figure out regarding the "if is a number" what about the other question? when you run the program there, does the menu jumps twice while you are typing too? |
Ah, I see - responded to your comment before I looked at the file. It sounds like a bug, per one of this issue: |
Thanks a lot! How do you find these answers so easy? I spent hours trying to find the issue. How do you do your searches? |
I'd say it's just breaking down the issue and tracing it back to whatever may be causing it. Then, for googling it, all that really matters is the key words. Since we didn't write the code for getting the prompts, I'd guessed it was most likely something to do with I think that's why it also helps run your program often as well. You might be able to more easily catch the issue. Like, "oh, I just added this |
Could you check my last commit (from today). Everything works, but if I have to use my function validation1 or validation2 at least once, the number is not being recorded to the variables (variable MENU, xValue or yValue...) |
You're not actually validating before you make assignments and/or carry on with your program. For instance, If I try to make number |
Yes. This is exactly my problem. I am stuck since this morning. I cannot find the solution following your instructions. could you share a weblink with an example? I did some progress (likely not the way you advised). REPO just PUSHED But with the MENU the problem still remains. |
I think this article might help you https://medium.com/javascript-inside/effective-data-validation-in-javascript-5c2f3e75249e It discusses more about the topic than perhaps necessary but I think still interesting. Still, you can see how they've written functions to validate data. So the main point with our validation is that we don't want to allow these inputs - i.e. assign them to a variable - unless they pass our validation. It may look something like this: |
ok. thanks! |
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to
main
since the assignment started. Your teacher can see this too.Notes for teachers
Use this PR to leave feedback. Here are some tips:
main
since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.main
. Click a commit to see specific changes.For more information about this pull request, read “Leaving assignment feedback in GitHub”.
Subscribed: @born3am