DEV Community

KIranuknow
KIranuknow

Posted on

1

Javascript to Typescript Tips

Some of the tips in migrating existing JavaScript code to TypeScript.

JavaScript

var name = "test";
Enter fullscreen mode Exit fullscreen mode

TypeScript

//declare fieldName as string
let name: string ;
name = "test";
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

This post blew up on DEV in 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!