Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				
kheftel6499y@shittywebdev relieved to learn I'm not alone! Why should the presence or absence of "var" make such a huge difference??? LOL 
Related Rants
- 
						
							
DevTard16User:"It's not working" Me:"Have you turned it off and on again?" User:"Yes" Me: goes down there, system upti... - 
						
							
AdrianCookie18
I think I'll never going to get a devRant stress ball, so i made this instead with my pretty low budget (0.5$)... - 
						
							
kwameboame4*yesterday* Client: "Perfect! How did you do this so quickly?" Me: "I used a library" *today* Me: "I'm still d... 

I am ashamed to admit that I only learned recently that omitting 'var' in a JS variable declaration inside a function gives the variable global scope. So that's why it wasn't working properly....
undefined
thatswhyitsnotworking
shame
facepalm