r/JavaScriptTips • • Aug 05 '23

Unexpected function behavior

Hello, I have a small problem that I create a project in js, css, html, which is launched locally in the browser and when everything I did last worked normally, the next day when I launched the script, one function stopped working completely and the other one works incorrectly. When I ran the script (current version) the next day, I did not modify these functions in any way, I did not change their calling context, nor did I change other functions that affect them in any way. The console in the code editor as well as in the Chrome browser does not have a single syntax error, etc. I always make copies of the entire script so that I can restore something if I messed up in the current version, or I would like to restore something as I did in the previous version. In these older copies, these functions worked normally, nothing happened, now if I remove the current version of the code, where these functions do not work properly and put the old one, where these functions worked 100%, it's the same problem. Anyone know what could have happened? I haven't changed any settings in the browser either. In that case, I would completely rule out a problem in the code.

0 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/Coding-Nexus Aug 06 '23

This is the same copy and paste response you sent on this post

https://www.reddit.com/r/AskProgramming/comments/15iu8gq/unexpected_function_behavior/jv0ei77/?context=3

We both came to the same resolve:-

there’s absolutely no way of knowing for sure if you’re not going to provide any code

And these comments also came up with the same response regarding code:-

https://www.reddit.com/r/learnprogramming/comments/15i0ivh/unexpected_function_problem/jurixd2/?context=3

https://www.reddit.com/r/learnprogramming/comments/15i0ivh/unexpected_function_problem/jurh42h/?context=3

If you want help from a community, and we are all requesting the same thing, do you not think that it could possibly be the issue?

Once again, without seeing the code your question boils down to:-

My code worked, then it stopped, then it worked again, tell me why.

But you can't see the code.

Do you see the problem?

1

u/Tough_Pride4428 Aug 06 '23

I really don't know what's hard to understand about the fact that the code where nothing was changed and everything was working now doesn't work not because of changes that I didn't make in the code at all, but because of some changes in the browser, probably. Sorry, are you trying to make a fool out of me or what?

1

u/Coding-Nexus Aug 06 '23

I would dream of making a fool out of anyone trying to learn.

It sounds like a caching issue in your browser, you can disable this by opening Dev Tools -> Networks -> Disable Cache.

Remember to refresh the site after.

If that doesn't work, try clearing your cache manually.

If you think the issue is with the browser, maybe you can provide us with some more information about what you have tried so we are able to cross them off the list?

Taking your frustration out on people trying to guide and help you is a sure fire way to ensure no help is given.

Remember you posted for help, expect people to ask questions to help debug the issue.

1

u/Tough_Pride4428 Aug 06 '23

You have an example here, I translate normally, and people continue theirs.
https://www.reddit.com/r/AskProgramming/comments/15iu8gq/comment/jv0icrq/?context=3

1

u/Coding-Nexus Aug 06 '23

Have an example of what, this is just a comment thread with you saying:-

Since I wrote that the unmodified code always functioned correctly, it is logical that it is not a problem with the code but with something else.

This is the same thing you said in your main post.

I asked you previously to try something, and also asked what you have tried, but you are not willing to provide anything?

How can we help you if you are not willing to do anything?