+ 5

What's the difference between TypeScript and JavaScript, and what's their purpose?

23rd Jul 2024, 2:36 PM
Carbon dioxide
Carbon dioxide - avatar
19 odpowiedzi
+ 6
TypeScript is a syntactic superset of JavaScript which adds static typing. This basically means that TypeScript adds syntax on top of JavaScript, allowing developers to add types. Found out more here: https://www.w3schools.com/typescript/typescript_intro.php
23rd Jul 2024, 7:21 PM
Chris Coder
Chris Coder - avatar
+ 4
Chris Coder I believe in the potential of the learners, and I would like to see them exploring it according to their current skills first... My worry is that we just tell them what they already know due to too broad formulation of the question.
24th Jul 2024, 6:56 PM
Lisa
Lisa - avatar
+ 3
Hey Lisa , I agree with what you said, but I've noticed that some folks are just comfortable using the app and don't want to leave it. Plus, searching with search engines isn't always easy, even though Google tries to make it simple. All those results can be confusing and overwhelming, especially if you're new to it. Remember, this is a learning platform, and some people are just starting out. They might feel lost and unsure about all the information and new experiences. So, my goal is to give them the answers they need right away and then offer some ideas on how to improve. I think it's important for us to be like guides, helping people find their way without criticism.
24th Jul 2024, 6:23 PM
Chris Coder
Chris Coder - avatar
+ 3
Yes, you can view it as an extension: It is Javascript – but with types. The browsers do not interpret Typescript – you have to transpile your Typescript to Javascript.
27th Jul 2024, 1:45 PM
Lisa
Lisa - avatar
+ 3
The browser executes Javascript, no matter if you write your code in Javascript or Typescript. What do you mean by "effective"?
27th Jul 2024, 2:09 PM
Lisa
Lisa - avatar
+ 2
What have you already found out in your own research? At which point are you stuck?
23rd Jul 2024, 2:45 PM
Lisa
Lisa - avatar
+ 2
No, i'm just questioning those code languanges.
23rd Jul 2024, 2:49 PM
Carbon dioxide
Carbon dioxide - avatar
+ 2
I have kinda mastered JS tho, and i still don't know what TS is
23rd Jul 2024, 2:49 PM
Carbon dioxide
Carbon dioxide - avatar
+ 2
But you have tried to find out what Typescript is? So there must have been anything about the explanation that you found confusing? What was it?
23rd Jul 2024, 2:55 PM
Lisa
Lisa - avatar
+ 2
Well, not really. I just wanted to know what TS is. I'm just curious.
23rd Jul 2024, 3:00 PM
Carbon dioxide
Carbon dioxide - avatar
+ 2
But that is what everyone would find with a 30-seconds google search. So I am still wondering what the actual question is?
24th Jul 2024, 8:52 AM
Lisa
Lisa - avatar
+ 2
Lisa me too. But I'm still trying to figure out how skilled they currently are. I need them to give me some feedback so I can help them better. I want to encourage them to jump in and ask more questions about their topic until they feel clear about it. For instance I would ask  “what are types”  to further my knowledge if i was still unsure.
24th Jul 2024, 7:15 PM
Chris Coder
Chris Coder - avatar
+ 2
So Typescript just an extension to JS. Is that true?
27th Jul 2024, 1:42 PM
Carbon dioxide
Carbon dioxide - avatar
+ 2
Sorry i took a long time to respond
27th Jul 2024, 1:43 PM
Carbon dioxide
Carbon dioxide - avatar
+ 2
So which is more effective. JS or TS?
27th Jul 2024, 1:52 PM
Carbon dioxide
Carbon dioxide - avatar
+ 2
Carbon dioxide TypeScript just throws errors when types don't match. JS doesn't, I guess this could speed up your coding so you're not hunting for issues later. There are various other additions added... It is useful but its not necessary.
27th Jul 2024, 7:25 PM
Chris Coder
Chris Coder - avatar
+ 1
I believe it's TS, but I'm not sure.
27th Jul 2024, 2:06 PM
Random Guy
Random Guy - avatar
+ 1
JavaScript is great for quick, flexible coding, while TypeScript is better for building larger, more complex applications with fewer runtime errors due to its type system.
29th Jul 2024, 9:00 AM
Siphesihle Kubheka
Siphesihle Kubheka - avatar