Skip to content

Commit 6ea1e09

Browse files
committed
Add sample javascript sources for testing
1 parent 2543961 commit 6ea1e09

File tree

9 files changed

+37
-0
lines changed

9 files changed

+37
-0
lines changed

samples/conditional.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
switch ('1') {
2+
case '1': console.log("aaa");
3+
}

samples/console.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
console.log(
2+
". . ." + "\n" +
3+
"| | _ | _. _ ._ _ _" + "\n" +
4+
"|/\\|(/.|(_.(_)[ | )(/."
5+
)

err.js renamed to samples/err.js

File renamed without changes.

samples/iteration.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// var sum = 0;
2+
// let counter = 0;
3+
4+
while (counter < 5) {
5+
sum = 0;
6+
}
7+
8+
for (var i = 1; i <= 10; i++) {
9+
sum += i;
10+
}
File renamed without changes.

samples/test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var a = 1;
2+
const b = 123;
3+
let c;
4+
const str = "Hello"
5+
const template_str = `hello`;
6+
7+
function add() {
8+
return;
9+
}

samples/unary.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
let _null = null;

samples/use_strict.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
const a = 1;

samples/variable.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var a = 1;
2+
const b = 123;
3+
let c;
4+
const str = "Hello"
5+
const template_str = `hello`;
6+
7+
c = null;

0 commit comments

Comments
 (0)