I recently had a problem with some javascript that runs counter to every area of my programming. Javascript does this often for me, so I'm not surprised.
I have a function as such ...
function x(param1, booleanParam, arrayParam){ .... }
I was getting a runtime error saying arrayParam.length
not defined. When debugging, I saw that this was true, and found out why. Turns out I forgot the comma in my function call as such ...
x(param1, true [arrayJunk]);
The problem I am facing is finding out why this call was made at all? Why is this not a compilation error, as Javascript sees it and thinks: "Yes, it looks like it might work!"
Thanks in advance for any enlightenment you can share!
source share