-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeScript
More file actions
44 lines (24 loc) · 679 Bytes
/
Copy pathTypeScript
File metadata and controls
44 lines (24 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
additional functionality Javascript.
function add(num1: number, num2: number){
const example: number [][] = [[0, 3, 1]];
num1.split('')
return num1 + num2;
}
- Use types.
- More readable.
77
We have following steps:
First you need to install typescript
npm install -g typescript
Create one file helloworld.ts
function hello(person){
return "Hello, " + person;
}
let user = "Aamod Tiwari";
const result = hello(user);
console.log("Result", result)
Open command prompt and type the following command
tsc helloworld.ts
Again run the command
node helloworld.js
Result will display on console