JavaScript as a first programming language

If I learn JavaScript as my first programming language, do you have any advice on how to make the best of it? I don't want to adopt poor programming practices or let it make me a bad programmer.

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Web/javascript
playfuljs.com/a-first-person-engine-in-265-lines/
twitter.com/NSFWRedditImage

>eloquent javascript

Just assume you have to set semicolons everywhere and be careful about linebreaks in combination with assignments, use strict modus, and pretend JS was statically typed and didn't have dynamic anything.

Is it really that easy? Everyone makes it out like JavaScript is an infectious disease and you will be gimped for life if you learn it first.

would recommend learning from mdn instead of eloquent javascript

developer.mozilla.org/en-US/docs/Web/javascript

>learning PajeetScript

You WILL be gimped for life if you learn Javascript as your first programming language. Even a shitty non-web language like Python or Java is infinitely better.

This is not about being hard, it's about being annoying.
And yes, depending in how much you broaden your horizon you will be gimped for the rest of your life.

Actually.. you can program in js without semicolons. lol

Can you please elaborate? Finding out why is the entire point of this topic.

It's just that it's shit, because the rules are retarded.

> [sic]

I'm triggered.

People exaggerate. Most dynamically typed languages are garbage and Javascript isn't significantly worse than Python or Ruby. With ES6 it's probably better than Python and it has far better implementations.

If you want a decent language start looking at languages that are statically typed at a minimum.

Javascript isn't that bad, people are just too lazy to learn it's weirdly designed syntax : 1+1 =2, var x= 1+"1", x = 11, typeof(x) = ???? Stupid shit like this, I really wished they would go with a Java strict-type syntax, JS is actually a really powerful language

Are you crazy?
Just go with Python or even better C

>You WILL be gimped for life if you learn Javascript as your first programming language.
Is this true? If so, why?

$$

then write c#. javascript is fucking garbage

t. react developer

Good decision, OP. Javascript is a very versatile and ubiquitous language. It will serve you well. JSLint can check your code for you.

So it's really just about avoiding the "bad parts" and you can mitigate the "damage" of it being your first language?

Not really. Javascript isn't just bad for what it is, it's also bad for what it isn't. It's not like you'll get tainted forever by learning javascript, you'll just be locked into one way of thinking until you learn new langs like c and lisp. It's only a lang to be tolerated for it's popularity and you'll stink of ignorance if it's the only one you know.

wtf is [sic]

>you'll just be locked into one way of thinking
What does that even mean?

OP, if youre stupid enough to believe the shit people say on Sup Forums programming threads (ie C is the only good language) then you deserve to be a shit 'programmer' just like most the people who post here. The truth is that Javascript has much more powerful high order functions than Python and prototype OO is much better and much more dynamic than class based OO. I could tell you more, but you dont deserve it because you really are stupid enough to take the js-is-shit meme seriously even though no one has EVER given a non-meme reason why its bad, so why should I waste my time informing you about js when you are someone stupid enough to take Sup Forums programming memes seriously?

Learning is about instant gratification. Just pick whatever works for you and learn. If that's Javascript or whatever, do it. If you try to learn the "proper way" and end up frustrated, well you just made things harder on yourself. It's not like Javascript is going to taint your blood with programming AIDS and make you forever a brainlet. You are a human being who can learn things. You'll learn other languages anyway, nobody worth a shit sticks with one language.

Two things you will learn if you hang around programmer communities is that programmers are shit tier teachers, and every programmer thinks other programmers are retards who write garbage code. So people who started with Java will be meme'd about doing things the shitty Java way, and so on. Lisp weenies will say that their language is a spiritual experience and anybody who doesn't like parenthesis spam is a scrub. Who cares. Programming is about problem solving, just do what solves your problems.

If you want to become a good programmer and not get meme'd for having x retard habits, then once you learn Javascript, branch out into other languages and learn why those memes exist and don't do them. And no matter what people will still say your way < my way. It's the way of the world.

>why don't noobs know everything

Wow you sure are a smart guy. But yeah, don't take Sup Forums shitposting seriously. Like every board this place is filled with misinfo. If a thing is popular like Javascript then don't think that some random shitposter on Sup Forums has the insider scoop on why all those people are retards. Just go with conventional wisdom until you know enough to form your own opinions.

>You'll learn other languages anyway, nobody worth a shit sticks with one language.
Absolutely this. It doesn't matter where you start, if you keep at it you'll branch out. It's not hard to learn a second language and after you have some projects under your belt you'll have a better idea of what suits your needs best. Maybe that will end up being JavaScript, maybe something else, but it won't hurt to start with JavaScript.

This sentiment exists outside of Sup Forums. You should get out more.

bump

I hated that book, holy fuck. Good code and even a few useful functions, just written in a very condescending tone that really turned me off.

You'll pick up bad habits.

>really turned him [sic] off.
I can see why.

Do you recommend an alternative?

Like what? The point of this thread is to learn how they can be avoided (other than not learning JavaScript).

>he not she

"Said in context" he is used "he" as an open ended term for the programmer. Labeling the majority instead of PC bullshit, so to prevent one side from being triggered over a pronoun, you slap a [sic]. They also use it when quoting someone who has misspelled a word in something and they don't want the reader to assume the (reporter) misspelled it.

If it gets you programming sure. It's a fast way to learn how to make modern feeling applications. The only problem I can see with it is that it's really strange compared to other languages like java, c, or ruby.

Write a DOOM clone in html5 like this one playfuljs.com/a-first-person-engine-in-265-lines/

>Most dynamically typed languages are only to be used for small scripts and Javascript isn't significantly worse than Python or Ruby. With ES6 it's probably better than Python and it has far better implementations.
this, /thread

Could someone please explain what's wrong with dynamically typed languages?

shits done at runtime, yo.
That said, with JS, Python, Ruby etc you can extend that to "dynamic language", because not only variables are dynamically typed but types itself are dynamic and variables aren't checked for initialization and other shit.

Do not confuse dynamic typing and type inference. Type inference is fucking awesome and saves a shit load of time. Dynamic typing is just retarded and should not exist.

How big of a problem is dynamic typing, and to what extent can it be overcome with things like mypy? Also, what's a good statically typed language to start with?
Cheers.

>With ES6 it's probably better than Python and it has far better implementations.
What makes ES6 so much better? I'm just starting to learn JavaScript.

I wonder when learning resources will actually integrate ES6 into them instead of tacking it onto the end.