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/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?