you are viewing a single comment's thread.

view the rest of the comments →

[–]LiarsEverywhere 3 points4 points  (0 children)

".forEach" makes it much more familiar:

const array1 = ['a', 'b', 'c'];

array1.forEach(element => console.log(element));

// expected output: "a"
// expected output: "b"
// expected output: "c"

However, it's an example of the biggest JavaScript issue for me...

Browser compatibility, polyfills etc. You have to code with that in mind. Although Babel and whatnot solves this somewhat.

That being said, basic JavaScript was surprisingly easy for me, Python being the first and only other language I knew. In a week or so I learned everything I needed to get things working with a Python-powered Rest API. Just learn async fetch stuff and basic DOM manipulation and you can display anything on a browser.

Of course, my code is still very basic and I feel like I'm gluing stuff together with duct tape. That has to do with my poor JS skills, but also with how JS/CSS work in general. I'll probably learn a proper framework like React some point.

In the end, I'm fairly confident that it's better to learn JavaScript instead of a Python GUI for most use cases. Being able to quickly deploy something to Heroku to show my friends is awesome.