TypeScript vs JavaScript comparison – pros, cons, trends

TypeScript vs JavaScript comparison – pros, cons, trends

TypeScript has been gaining ground in favor of JavaScript in recent years. How do they compare in 2020? TypeScript vs JavaScript analysis for business.

JavaScript has been and in many ways still is the standard language of the web browser. But while it is the inevitable result of any frontend work or backend development with Node.js, it is increasingly often not the building material. Developers are turning to TypeScript as their go-to language for writing web applications. Why is it the case? What has driven so many developers away from JavaScript and into TypeScript? What’s the future of this struggle? Let’s make a side-by-side TypeScript vs JavaScript comparison.

Ever since the earliest days of the Internet, developers have always had a love-hate relationship with JavaScript. But since it is one of the three technologies (besides HTML and CSS) at the very core of the browser and web development, nobody really thought about replacing it. The efforts focus on trying to make it better. The folks at Microsoft, however, decided that JavaScript needed more motivation to work on its flaws. But how did TypeScript exactly come into existence? Let’s take a step back.

JavaScript and TypeScript – the beginning

JavaScript is almost as old as the internet. Back in the 90s, out of desire to add more interactivity to the web, folks at Netscape (ancestor of Mozilla) created a new language with a Java-like syntax. This was JavaScript. In order to ensure more cooperation when it comes to standardization, they submitted it to ECMA International. The standardized version is called ECMAScript and the subsequent versions of JavaScript are its implementations.

JavaScript has become hugely popular and over time it has matured into a very capable language with tons of libraries and framework.

But the truth is that it never ceased to annoy developers.

Being weakly and dynamically typed, the code may have included at times a lot of unexpected errors. And then, there was an issue of compatibility between different browsers, which used various interpreters or even different implementations of ECMAScript altogether (Microsoft’s JScript).

Subsequent versions of ECMA attempted to solve various problems and add new features, but devs at Microsoft wanted a new solution for writing large-scale web applications faster. Their efforts led in 2012 to the release of TypeScript – a new language that can be compiled (or transcompiled) to regular JavaScript. It’s thus a superset of JavaScript, since all JavaScript code is also valid TypeScript code. At the same time, there are a lot of things that you can (directly) do only in the former.

cto's guidebook frontend javascript node typescript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Node.js projects in 2020 – overview

They all aim to take full advantage of Node.js’ selling features such as high performance or suitability for microservices-based architecture. In this article, we’re going to show you some of our proudest Node.js works.

How to Create Web Push Notifications with Node, TypeScript and JavaScript

Push notifications have come to the web! In this tutorial, I'll show you how to create a full-stack application that is able to send and receive web push notifications.

Serverless Node TypeScript

Serverless Node TypeScript is a starter kit to write serverless applications by using the Serverless Framework in Node.js and TypeScript. An Apollo GraphQL server and a REST endpoint come configured out of the box

Deno, a Secure Runtime for JavaScript and TypeScript

What is Deno? Deno is a runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language. It was created by Ryan Dahl, original creator of Node.js, and is focused on productivity. It was announced by Dahl in 2018 during his talk "10 Things I Regret About Node.js"

A template for Node.js & TypeScript.

typescript-starter .A template for Node.js & TypeScript.