Should I learn JavaScript before TypeScript for my website?

November 16, 2026 4 answers
Asked by Tovrik-3s

I've learned some HTML and CSS and want to build a website. TypeScript seems like a good fit for the project, but should I learn JavaScript first?

Answers

Vesmar.2p

I'd start with JavaScript fundamentals, then add TypeScript once you're comfortable writing small pieces of code. Functions, objects, arrays, and async code all work according to JavaScript rules, even when you use TypeScript.

Starting with plain JavaScript also makes it easier to tell whether you're struggling with how the code runs or with a type error. You don't need to master the whole language before moving on.

Reply to this answer
q_317!marble

You can start with TypeScript if that's what you want to use for the site. You're still learning JavaScript along the way, just with type checking to help catch some mistakes before the code runs.

A starter tool such as Vite can set up a TypeScript project for you. Keep the type annotations simple at first and look up the JavaScript concepts underneath whenever the code doesn't make sense.

4k~latchcrayon_395:

One distinction worth keeping in mind: passing the type checker doesn't guarantee the code will behave correctly at runtime.

Reply to this answer
_e92!spareladder.5

Plain JavaScript has a nice low barrier to entry. Open the browser developer console and try a few expressions, or add a script to your page. No project setup needed just to experiment.

That makes it a handy place to get your bearings, even if you decide to use TypeScript for the actual project.

Reply to this answer
_b58+opalgauge.4

TypeScript is especially useful when a project grows and it gets harder to remember what shape your data has. The tradeoff is extra tooling and occasional type headaches, particularly when a library has incomplete or missing type definitions.

So there's no need to treat the choice as permanent. Starting small in JavaScript and introducing TypeScript later is a reasonable option too.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions