Now let's see how static typing is useful by updating the sum string variable to a different type than it's expecting. Let's run a compiler. The compiler is mad because I tried to assign a number to a variable that I already said was a string. Sum string is a string. I gave it a number.
Another useful aspect of TypeScript is exploring APIs with an IDE is way easier. The indecipherable function accepts a string and a number. When we begin typing the function, the IDE helps with auto-complete, but also shows us what type of arguments the function is expecting. You can see the first one is a string, and the second one is a number. When I run the compiler, no errors.
If we pass an argument that the function is not expecting, the IDE will warn us. You can see there's a little red line right here, and there's also one on the side over here. The error that it's pointing out will also show up when you compile. I tried to pass an object to the function that's supposed to be a number.