-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsample.javascript.txt
70 lines (55 loc) · 1.23 KB
/
sample.javascript.txt
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
var foo = 'foo';
let bar = 'bar';
const XYZ = 'XYZ';
const xyz = XYZ;
const f = foo;
const _null = null;
const _undefined = undefined;
const _bool = true || false;
const _numb = 999;
const _string = 'string';
const _array = [999, 'string', true, null, undefined ];
const _object = {
foo,
bar: bar,
}
import Module, { SubModule, module } from 'node_modules';
const AnotherModule = require('node_modules');
const yetAnotherModule = require('node_modules');
class SomeClass extends AnotherClass {
constructor(){
super();
this.state = {
key: value,
}
}
method = () => {
for (let i = 0; i < 10; i++) {
console.log('miao', variable);
}
while (i < 10) {
if (true) {
} else if (false) {
} else {
}
}
try {
} catch (e) {
} finally {
}
}
method = () => {
return this.state;
}
render() {
return (
<div>
<Component>
{ () => {'something else here'}}
</Component>
{'something in here'}
</div>
);
}
}
export default yetAnotherModule(SomeClass);