...

/

Introduction to Strongly Typed Code

Introduction to Strongly Typed Code

Let's learn about strongly typed code and its impacts on our app development.

What is strongly typed code?

Strongly typed code is a programming technique that clearly defines variables and their data types. In other words, the values of the variables must be consistent with their specified data type. Let’s consider two examples of strongly and weakly typed code:

function sum(num1, num2) {
return num1 + num2;
}
Example of weakly typed code

In the example above, we have both loosely typed JavaScript and strongly typed TypeScript code of the same function sum(). The only difference between the two code snippets is ...