this post was submitted on 15 Aug 2023
13 points (93.3% liked)

No Stupid Questions (Developer Edition)

896 readers
36 users here now

This is a place where you can ask any programming / topic related to the instance questions you want!

For a more general version of this concept check out [email protected]

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

Do I master Typescript if I master Javascript ? Is Typescript syntax different ? Answers appreciated, thank you !

you are viewing a single comment's thread
view the rest of the comments
[–] flurry 6 points 2 years ago (4 children)

TypeScript is a superset of JavaScript. It means any valid JavaScript is also valid TypeScript.

You should start to learn basic JavaScript mechanisms : prototype inheritance, hoisting, scopes, this, event loop, type coercion.

Once « JavaScript » sounds familiar you will embrace TypeScript which is JavaScript with steroids!

[–] nbafantest -4 points 2 years ago (3 children)

TypeScript is a superset of JavaScript. It means any valid JavaScript is also valid TypeScript.

This is backwards. JS is superset and all TS compiles to valid JS.

The vast majority of JS does not translate to Typescript as the JS is untyped.

[–] flurry 5 points 2 years ago* (last edited 2 years ago)

You don’t necessarily need to believe me but please double check your claims before you spread misinformation

load more comments (2 replies)
load more comments (2 replies)