- Make sure you have NodeJS installed, if not, install them here
- Run the following command in your terminal for a specific file.
npx ts-node <FILE_NAME>
For example
npx ts-node binary-search.ts
If npm prompt to install ts-node, say yes/y
Done! you will see the result in your terminal.