r/javascript • • Jun 11 '23

AskJS [AskJS] Is JavaScript actually incredibly simple?

Background: I struggled to learn JS for years, mostly because I found the syntax strangely burdensome = () => {} coming from Python ():

But now I have been using chatGPT to program frontend and the more I have GPT generate the reactjs for me, the more repetitive and simple I am finding it.

So I started to gain some confidence and today I searched on Amazon for a cheat sheet (I was actually looking for a css cheat sheet first and found one that is like 4 pages long.)

The only JS cheat sheet I could find is one page and really just has some basic info. Which felt like it was starting to confirm to me that once you get past the Ålien syntax, JS is actually pretty simple.

Am I missing something here?

0 Upvotes

8 comments sorted by

21

u/rodrigocfd Jun 11 '23

Background: I struggled to learn JS for years

But now I have been using chatGPT to program frontend

How do you know the generated code is good?

8

u/ndreamer Jun 11 '23

It's easy to get started. Trying to learn React though when you don't understand fundamentals is like building a house with no foundation.

11

u/[deleted] Jun 11 '23

You can do alot with javascript these days, I'd not call it simple.

What you are really describing is the fact in Web development we tend to solve the same issue multiple times across different projects. So you won't need to "see" what javascript can do.

I've found it to be very capable for the task at hand in the day to day, and found it to be extremely surprising when working on quirky hobby projects.

In terms of using it day to day, it is simple and you are right that the syntax is the only thing that "throws off" other language devs.

4

u/azangru Jun 11 '23 edited Jun 11 '23

Am I missing something here?

No, you aren't missing anything. Javascript is quite simple; and rather similar to python, ruby, php, or perl. These are all scripting languages of the C family. Javascript also has Scheme — and therefore Lisp — in its pedigree, which makes it well-suited for handling functions as first-class citizens. Much more convenient than python, to my taste.

6

u/pussyweedacidsatan Jun 11 '23

React is not Javascript. And the answer is no, Javascript is not simple. It is rather so complex that you can do quite a bit with it with very limited understanding of the language and ecosystem. This is exactly your case. Now with AI it probably seems trivial. Think about writing a reactive framework for the DOM in vanilla JS to understand how deep this goes.

2

u/beasy4sheezy Jun 11 '23

No, JavaScript is not incredibly simple. I’ve worked in quite a few languages (not python) and JavaScript feels pretty average or maybe leaning toward difficult, due to inconsistencies and easy ways to shoot yourself in the foot.