Skip to content

Commit 005d499

Browse files
committed
lesson-8
1 parent 18550db commit 005d499

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
lines changed

app.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/sandbox.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
"use strict";
2-
console.log('testing');
2+
// let greet: Function = () => {
3+
// console.log('hello, world');
4+
// }
5+
// greet = 'hello';
6+
// greet = () => {
7+
// console.log('hello, again');
8+
// }
9+
var add = function (a, b, c /*?*/) {
10+
if (c === void 0) { c /*?*/ = 10; }
11+
console.log(a + b);
12+
console.log(c);
13+
};
14+
add(5, 10, 'ninja');
15+
var minus = function (a, b) {
16+
return a + b;
17+
};
18+
var result = minus(10, 7);
19+
console.log(result);

public/test.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/sandbox.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
console.log('testing');
1+
// let greet: Function = () => {
2+
// console.log('hello, world');
3+
// }
24

5+
// greet = 'hello';
6+
7+
// greet = () => {
8+
// console.log('hello, again');
9+
// }
10+
11+
const add = (a: number, b: number, c/*?*/: number | string = 10): void => {
12+
console.log(a + b);
13+
console.log(c);
14+
}
15+
16+
add(5, 10, 'ninja');
17+
18+
const minus = (a: number, b: number): number => {
19+
return a + b;
20+
}
21+
22+
let result = minus(10,7);
23+
console.log(result);

src/test.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)