diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..0bd4dc7 --- /dev/null +++ b/tests/test.js | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | function hello() { | ||
| 2 | console.log("Hello, World!"); | ||
| 3 | } | ||
| 4 | |||
| 5 | function add(a, b) { | ||
| 6 | return a + b; | ||
| 7 | } | ||
| 8 | |||
| 9 | class MyClass { | ||
| 10 | constructor() { | ||
| 11 | this.value = 42; | ||
| 12 | } | ||
| 13 | |||
| 14 | myMethod(x) { | ||
| 15 | return x + this.value; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | |||
| 19 | const obj = { | ||
| 20 | shortMethod(a) { | ||
| 21 | return a; | ||
| 22 | } | ||
| 23 | }; | ||
