Board Thread:Code Review/@comment-6475116-20150718222706/@comment-23880286-20150719201017

Curiouscrab wrote:

Vogel100 wrote:

Curiouscrab wrote: I like to limit the number of variables I use in case I need a variable for another script and the less variables the less chance I accidentally re-use a variable that causes issues. That isn't a problem if it's inside a local scope thing, is it?

And for the functions, I just like to remove as much repetition as possible, to just make it nicer and cleaner to read. The same goes for variables. I don't know all the disadvantages of using them though. If I define a variable elsewhere it will affect my script. Also, I try to make my scripts as readable as possible. Sometimes, long wordy scripts are the easiest. Really? If you have this for example: var something = 'something' //begin your script var something = 'another thing' console.log(something) //end your script Then the result will be 'another thing', regardless of how it's defined outside of the script. Sorry if I'm missing something and just being stupid and wasting everyone's time here. I'm still learning JavaScript so I have the right to be stupid and waste everyone's time. :p