This is for all level programmer, especially the vets. Do you put the function declarations on the top or the variables?
I asked this because I was confused for a moment when I looked inside a function I created due to having some DRY code based on it. And what confused me for that moment was a variable being called from within the function. So I was like, “Did I declare that variable?” And I realized I did create the variable under the 2 function declarations way in advance (when I started writing the code) and I’m like “maybe I should put the variable(s) above the function declarations or should I put the functions on the very top?”
What are your thoughts on this?