Monday, February 22, 2016

JavaScript tips(#2)

Before I wrote here some things I learned after having some issues programming with JavaScript. Here are some more issues to watch out for:

  • Sometimes you want to pass a function to a veritable(example: event handler). Make very sure you don't put parentheses on it or else your browser will call the function and pass the result too the veritable which is not what you want. 
  • Also I had a problem today when I tried to make a function called 'submit' and when I called it, a global  function by the name was called instead of the local one. 
That's all for now, feel free to leave your own tips in the comments bellow.