• Mattan IngramMattan Ingram, almost 6 years ago

    As a designer who is fluent in HTML/CSS but can only read JS and write very basic functions, I want to learn more about best-practices in JS with examples specific to prototyping UI or manipulating basic data. I have looked at lots of JS learning resources and while some are great, they are too often over-abstracted regarding manipulating data or arrays without any clear visual connection to how this could help me save time prototyping or animating a website or app.

    I know theoretically all the things JS can do to a string, or array, or what-have-you, but I have a hard time knowing how to tackle something I want to do or what the best way to do it would be.

    For example:

    If you want to generate 50 elements and randomize these two X and Y attributes for an animation with increasingly shorter duration per element, this is the cleanest way to do it and why. Here is another way to do it that is harder to read, but is more performant and why.

    0 points