JavaScript or TypeScript.

Pamudu Manjitha Ratnayake
3 min readFeb 26, 2022

What does mean by Scripting Language?

Scripting language is a set of commands that has the ability to execute without being compiling. That means Scripting Language has the ability to perform different actions with in a particular run-time environment. Mainly they are used in web development, games, creating plugins and system administration. Scripting languages are interpreted languages. (Interpreted languages run through a program line by line and execute each command, without requiring them previously to have been compiled into a machine language program). Scripting languages are supported by almost every platform, they don’t need any special kind of software to run them. Mostly scripting languages are open-source languages.

Two main types of scripting languages,

Client-side scripting languages: Client-side scripting languages run off the browser. That mean on the client end. Examples are HTML, CSS, JavaScript, jQuery.

Server-side scripting languages : Server-side scripting languages run on a web server and they are used to create dynamic web pages. When a client sends a request, the server responds via HTTP. Examples are PHP, Python, Node.js, Pearl, Ruby.

What does mean by Programming Language?

Programming Languages are mainly used to interact with computers and mostly used to build mobile apps, websites and also desktop apps. Programming languages are usually consist of two components. They are syntax and semantics. Programming Languages can be categorized in to three parts. They are,

Machine Languages: This is a low-level language that computers can understand easily.

Assembly Languages: This is also a kind of low-level language created for specific processors.

High-Level languages: This is used to create user-friendly software and websites. High-level languages can be further divided in to three and they are, Procedural-oriented programming languages, Object-oriented programming languages, Natural Language.

.

So all programming languages are scripting languages?

The answer is, No! All scripting languages are programming languages but all programming languages are not scripting languages.

Which one is better? JavaScript or TypeScript

JavaScript

JavaScript is a scripting language that helps to create interactive and dynamic web pages. JavaScript is highly characterized by its dynamic typing and just-in-time (JIT) compiler. JavaScript follows a client-side implementation and its a multi-paradigm language. JavaScript is compatible with all kind of browsers. JavaScript does not need to compile, errors can only be found during run-time. JavaScript has dynamic typing.

Now a days JavaScript standing out as a server-side technology mainly due the development and the popularity of Node.js.

TypeScript

TypeScript is an object oriented programming language and it is not a scripting language. JavaScript can manage lots of code lines but it was not be able to developed to handle very extensive and complex applications. Because of that, Microsoft introduced TypeScript and it is a superset of JavaScript created for handle the larger applications by being strongly typed and by including compile-time error controls. TypeScript has a compile-time error feature that mean it compiles the code and check for compilation errors that may be found in the syntax. TypeScript enables both static and dynamic typing.

Conclusion

We’ve learned the difference between JavaScript and TypeScript and also we’ve learned, what are scripting languages and what are programming languages. In my opinion, TypeScript is easy to maintain, great for code organization and enhances project productivity.

--

--