DEV Community

Discussion on: Don't Give Up On Learning JavaScript After Three Weeks

Collapse
 
zacharythomasstone profile image
Zachary Stone

Or you could use Typescript which is an easier entry point, and you can use it with Angular/React/Vue, because it complies down to JS.

Collapse
 
rvakid82 profile image
rvakid82 • Edited

Do i have to know how to use Javascript to use typescript or compile? I haven’t learned angular/react/vue yet becuase everyone says i need java for that.

Thread Thread
 
zacharythomasstone profile image
Zachary Stone

No, although you will see some parallels.

Typescript is a subset to JavaScript. Should you ignore learning JavaScript and only use Typescript? No... Not at all. But I would recommend Typescript because it has an easier learning curve.

Think of Typescript like a chainsaw with a safety guard on it, and a bunch of features that make it hard, but not impossible, to hurt yourself.

And then JavaScript is without those safety guards and allows you to do things you couldn't do with Typescript.

Some may think, why ever use JavaScript when it's easier to get hurt, especially since Typescript serves the same end goal?

JavaScript is more flexible, although there are some really funky stuff to learn with JavaScript and the fact that you can confuse yourself into a corner dealing with it's quirks, it's still an important language to learn well.

Ultimately, once you get comfortable with programming concepts with Typescript, and enjoy the benefits of a strict types language, you can start looking at the complied code and see the vanilla JS and start learning more and more.

Thread Thread
 
zacharythomasstone profile image
Zachary Stone

You don't need JAVA for Angular/react or Vue. Although learning JAVA wouldn't hurt I guess?

I'm curious why they are telling you that you NEED JAVA. Maybe you confused JavaScript with JAVA?

Thread Thread
 
rvakid82 profile image
rvakid82

I’m not sure. I don’t know what anglar/react/whatever actually do. Everyone says i need to learn javascript becuae i can’t use html
And css anymore, everything is jacascript. This is just advice i’m getting from here, course discussion boards. I dunno, i’m clueless to how anyone uses it

Thread Thread
 
zacharythomasstone profile image
Zachary Stone

Whoever told you that you can't use HTML and CSS is wrong.

HTML CSS and JavaScript are what make up a website.

Think of HTML as the Bones of the site. CSS is where you add the style to your website. (So fonts, colors, font size, etc.) Think of CSS as the skin of the site. And JavaScript gives you the functionality to the site.

Also I would recommend this YouTube playlist that utilizes P5.js it's an online editor where you could just code along with JavaScript.

youtube.com/playlist?list=PLRqwX-V...

The coding train does an excellent playlist teaching you different concepts while seeing results and it's fun.

Thread Thread
 
rvakid82 profile image
rvakid82

I’ll try the youtube playlist out, thank you. I’ve used HTML and CSS professionally for almost 20 years so it’s good to know it’s not dead

Thread Thread
 
zacharythomasstone profile image
Zachary Stone

Not dead at all.. yes, most places will have you use SASS or LESS or something that generates HTML but learning those technologies is just building on your understanding of the basics of HTML and CSS there is some added features and syntax changes, but 20 years of experience in HTML/CSS is a benefit to you.

Collapse
 
blindfish3 profile image
Ben Calder

Typescript is an easier entry point??? What?!

I'm sorry but I have to strongly disagree. Sure, type-checking can help catch some common bugs that trip up beginners; but you have to bear in mind all the additional complexity Typescript introduces:

  • additional setup and tooling required
  • required understanding of types and type definition
  • inferred types are not always appropriate and sometimes need to be overridden
  • compilation introduces an extra step the beginner needs to understand
  • compile time errors mean beginners don't see any result in the browser until they have understood and fixed the error: a potential source of massive frustration

Anyone interested in learning plain JavaScript can get started with minimal effort. Hit F12 in your browser and you can try out JS in the console with literally zero set-up. Make a mistake and you'll see the results of that mistake (be that 1 + "1" = "11" or a console error) instead of having to understand a type-checking error.

But TBH for those really struggling to gain an understanding of programming basics I'd suggest something like Scratch (scratch.mit.edu); since that avoids one very common source of frustration for beginners: the fact that a simple typo or misplaced character can cause your code to break...

Thread Thread
 
zacharythomasstone profile image
Zachary Stone

Haha true. But I found having type checking to be extremely helpful. And you can easily look up how to set it up. Most, if not all, text editors support it. (Or you can download a package to support it, VS Code detects it and says "want to download the package for TS?"Then you just click yes.

Types and type definitions in my option is easier point of entry to understand than car, let, and const.

I agree on the inferred types.

I agree on the compilation, but again.. with text editors you can set this up easily with a guide.

And yes, no results can mean a headache but on the flip side.. seeing results and not looking for errors begginers can think they didn't something correct when they did not at all.

Truth is, I feel like Typescript is an easier entry point because I learned C# first. I mentioned that in a nother comment and should of explained that in my comment you replied to.

I do recommend if you have little to no experience to try out an easier programming language, especially if nothing in JS is sticking.

Collapse
 
rvakid82 profile image
rvakid82 • Edited

Thank you for the advice Ben. What do i practice in the browser? I don’t remeber any code or how to write things. How did you get the code for the math? Is there insturctuons for this kind of practice?

Maybe i will try scratch. I keep reading all the terms and syntax and whatever but i can’t make any sense out of it

Thread Thread
 
zacharythomasstone profile image
Zachary Stone

I think you tagged the wrong Ben.