To do this, we need to perform the following steps. Step-1 Open the Text Editor and write/copy the following code. Step-2 Save the above file as ". ... Step-3 Compile the TypeScript code. ... Step-4 Now, to run the above JavaScript file, type the following command in the terminal window: node filename.js and press Enter. More items...