DEV Community

loading...

JAVASCRIPT, why do they say “it’s easy to learn”

yobretyo profile image Bret ・1 min read

I’ve been running into that, JS is tough at times, you have to do a arrow or no arrow function, once you create a function, to implement something you made into it... or replug what you made up above? Things like Nodes or Attributes at times .... I mess up what’s being referenced and it messes it up. Allot, ALLOT of tutorials will just create objects, but don’t use ANYTHING in a proper real world example.

Discussion (16)

pic
Editor guide
Collapse
drakobian profile image
Drake Bennion

this picture Yeah, it's a tricky one. I'm constantly reminded of this picture comparing "Javascript: the good parts" to "Javascript: the definitive guide"
I would def second Jared Daines on You Don't Know JS.
And I wish I could say arrow functions didn't still trip me up from time to time!

Collapse
miguelbogota profile image
Miguel Bogota

I know that feeling, it was hard for me as well to learn javascript since I came from a strong typed language (c#). Some answer to your questions are... I usually use arrow functions all the times, don't really remember why but there's a reason for it, I think it was the way javascript was compiled to binary in the browser it will first set those normal function to allow be used everywhere and will consume time if you only have non-arrow functions. As recomendations I give you is to not learn javascript and learn typescript, if you come from a strong typed language is easier and if you are learning this as your first language is easy to understand oop with types and prevents a lot of bugs, typescript is something like a compilter, you write your code and in the terminal just type tsc and boom it returns a .js file. And if you really learn you should not learn javascript alone but with a framework like react, angular vue or svelte, I personally like angular since it easy to learn, a lot of people say is react but if you're learning react you have to learn redux and that is the worst thing to learn, especially with typescript.

Collapse
yobretyo profile image
Bret Author

I’ve been using React and I like it, it has helped me learn JavaScript allot. I haven’t focused on Redux allot.

Collapse
benjioe profile image
Ferrier Benjamin

I thinks that React is one of the hardest UI framework to learn, because you have to understand some advance feature to use it (like this keyword).
Now with hooks it's a little easier but still harder than VueJs or Angular.
(But when you know it, it's awersome)

Thread Thread
miguelbogota profile image
Miguel Bogota • Edited

I don't think React is harder than Angular or Vue, but since it only handles the UI part the hardest it to learn all this third party libraries like routing, forms, reactivity... and kind of complicates everything. But If you're learning for now react use TypeScript, I think I can't stretch this enough but TypeScript is the best Microsoft did. and For React try to always use hooks, best thing Facebook did as well :v

Also for real life examples you should try to do thing for you own. I learn Angular by making a love page for my girlfriend where she could add love memories, I use a quote of the day API for romantic quotes that changes everyday and use Firebase as back-end. You could do something like that or maybe a portfolio... When you're doing this you'll realize all the thing needed to create a web app and make it work.

Thread Thread
yobretyo profile image
Bret Author

Thank you! I already have a idea of a “snippets” list, to create snippets of a card or page, that I can then copy with just a “onClick”, but when I try and copy the Class, it dosnt work. Idk what to use for copying the text/syntax in a designated area. So, it’s kinda like a To Do app, except for compiled code and you can “on copy” it

yobretyo profile image
Bret Author

Yea I get messed up on this.state or useState and where to implement that. Define rly when your in the, smaller class info? Where you have card, index... but the card is the class name or you have to make a different name

Collapse
benjioe profile image
Ferrier Benjamin • Edited

Javascript "it's easy to learn" because you can create much with few things. Just with functions and dictionaries (object).
But mastering it, understanding 'this' keyword, 'closures'... are hard to do.
So start small.

P.S: To have a real world example, you can look at projects on github or gitlab ;)
P.S 2: I have understand some advance parts of javascript by learning another language (Haskell, c#...), it could be a solution.

Collapse
drakobian profile image
Drake Bennion

Bushnell's Law says the best video games are easy to learn, but hard to master 😁

Collapse
kahawaiikailana profile image
Kailana Kahawaii

Hi Bret,

I understand your frustrations. I started learning Javascript a year ago, and I still encounter some confusing features and concepts at times. I found that doing algorithms in JS through leetcode and other sites helped me with the syntax.

I also think that learning React "too fast" can also lead to some confusion. At least, that's what happened to me.

Some things I found helpful was building a project with just Javascript, CSS, and HTML to see how those different languages interacted. Then, I built a React project building on those skills.

Actually, one of the most confusing things right now is figuring out how to incorporate CSS into my projects. I recently discovered styled-components and that's helped me learn CSS in a specific, React component structure way.

Collapse
ronca85 profile image
ronca85

they say css is easy as well. would you agree? css is easy to start with, but it takes years of dedicated work to master it. most people just gloss over it and use and abuse it because they have to use it now and then and they never learn to use it properly and create a million of issues for people down the line. the same is true with js. people need to learn how to approach and fix problems properly. the language used becomes just a tool by then. frameworks are just a way to fix a deep rooted problem that never should have existed in the first place and they will never fix the real issues.

Collapse
tinydevops profile image
Jonathan Hall

I imagine most people who say JavaScript is easy to learn, are saying so because for them it seemed easy to learn. That's not very scientific.

There's also a ton of information for newcomers to JavaScript, so even if the language itself isn't as easy as some other language, finding help is easy. So that can be a contributing factor.

In my view, as someone who knows JavaScript, but doesn't use it daily, it's an easy language to learn the basics of, but very difficult to get good at using.

Collapse
tomaszs2 profile image
Tomasz Smykowski

❤️👍 It is exactly what made me create Summon The JSON project. Programming does not need to be a magic. 🧙‍♂️ Check it out: producthunt.com/posts/summon-the-j...

Collapse
uberkeeg profile image
Jared Daines

github.com/getify/You-Dont-Know-JS has some good free resources about the fundamentals of how and why Javascript works the way it does.

Collapse
simpleadam profile image
simpleAdam

its very hard.

Collapse
sharpninja profile image
The Sharp Ninja

It's really a misnomer. TypeScript is easier to learn, but still not easy.