-
Scope & Timeline. Troubleshooting takes time and it's painful when the problem is because of where something is written in respect to other things.
-
"Return functions". I wish i learned to do this earlier. Instead of writing "document.get[thing]" over and over again sucks. So creating a return function in my global object is a great timesaver... something like UI.bySelect("#tag") and UI.byTag("body"). I believe this is also a good way to learn how to use parameters
-
Parameters. Specifically about the scope of where a variable is named. I found that there are times where i'll use "x", "y" for a generic variable to pass as a parameter. This means the previous function will try to pass their variable in those spots. This is something to pay attention to when using more than two parameters
-
Using setTimeout() to delay a className change. This is something that i spent a lot of time and code on to do things, only to find out that a simple timeout can delay a change momentarity. This is important when loading how i want users to see things. It would be cool to see a good way to combine this with the lesson on return functions, that way we can learn ways to minimize clutter.
-
Large projects hurt me. I get excited, work hard, do the majority of the game, then give up because the amount of functions in the global scope becomes unbearable to maintain.
-
Clarity and vision. I want to master what "vanilla" means in JavaScript, but i also feel like i needed more direction on the "whens & whys" behind using modern frameworks.
-
How to set up a global object? In the beginning, i was just writing code in to a script tag directly on my HTML page. I had casually learned to link to a script. with that, i learned how to seek folders and directories in the src. The whole "why won't my javascript file load" thing was where i lurked on stackoverflow. When i learned how to properly link and load when ready was a hurdle, but looking back, was simpler than it could have been.
-
JSON trouble. The learning curve on when to parse, when to stringify, when to call -or call again- an object in order to take that information and either display, append, save item.... it was hard. And i feel there are "magical" things we can do with JSON that no one even talks about... things like using timestamps in the keyname.
-
Handling integers in localStorage. To this day, i still had no idea why i need to decorate my variables to do maths. I have seen people give me solutions that they say will work better, but it doesn't work, i got decorated variables that enable a function to work correctly and any change or attempt a refractor typically breaks the function.
-
It would be nice to see an entire video dedicated to "best practices" from [stoneCyphers'] point of view.
Last active
March 18, 2018 19:01
-
-
Save Ehawk82/4f61f4e611e256f2697e1199bbaac96c to your computer and use it in GitHub Desktop.
My experience in learning JS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment