What Is Social Responsible Investing

Financial investments are primarily done with the expectation of achieving a profit. Yes, money still drives the main investment portfolio decisions and yet it isn’t the sole criteria any longer…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




JavaScript Vs. TypeScript

We have been working JavaScript to do some amazing things, but JavaScript has its limitations. Microsoft released the open-source TypeScript to add more functionality to JavaScript by creating a superset to it. Type script is now ten years old and has been adopted to be used with many other front-end and back-end libraries and can be used with Node.js and Deno (Jess, 2021).

As I mentioned before, one major difference between JavaScript and TypeScript is that TypeScript is built on top of JavaScript and so all JavaScript code is valid TypeScript code. But there are some big differences between the two and why Microsoft built this language (Jess, 2021). JavaScript has the ability to assign whatever you want to a variable. This is called dynamically typed and can be problematic. Having learned C++ before, TypeScript variables feel more natural to me as they are statically typed as in you declare the variable and what kind of data should be held there. So, you can’t store a string in an integer or vice versa. This can help us code better as there is checking for these kinds of error at the time of coding and not waiting to run the code to see if it crashes (Hamedani, 2022).

Now TypeScript has its faults as well. In order for it to run, you must go through a transpilation or in other words, it needs to be compiled and transposed to JavaScript in order for browsers to understand it (Hamedani, 2022). It is not easy to start with and is not worth the time and effort for smaller projects, but when it comes to bigger projects or ones with multiple people, TypeScript can come in handy to catch bugs earlier and compile group input.

TypeScript is not as beginner friendly as JavaScript, but it is more rigid and can help create better programs. With more and more browsers accepting its code, it may become the future, and JavaScript may go away as itself and will be superseded by TypeScript.

References

Add a comment

Related posts:

Pantoum

The form of poetry from the reading is known as a pantoum. This originates from the French in terms of Malay. The rules of a pantoum follow the abab rhyme as each line can have either eight syllables…

CEDRO FINANCE

Cedro Finance is an interconnected, multi-chain decentralized liquidity protocol in which users can lend and borrow the assets listed on multiple chains with affordable transaction fees. The Cedro…

Permission To Move Forward Please

My grandmother was born in the early 1900s. She left school after the 8th grade to help her father on the farm, cook and clean for her three brothers and sister after her mother died during…