r/JavaScriptTips • u/Tough_Pride4428 • 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.
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:-
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:-
Do you see the problem?